Zend Studio 格式化后HTML代码与PHP代码之间有空格,如何去除

WBOY
Release: 2016-06-23 13:38:15
Original
965 people have browsed it

<tr <?php if($i&1)echo ' class="alternate"'?>>
Copy after login

这段代码位于一个循环内,$i是自增量,目的是为了奇数行,加上class,使其高亮

我习惯与用Zend Studio进行代码整理,ctrl+shift+f 但是在这种情况下貌似出了点问题
在偶数行,显示的应该是 

而非 多了一个空格,在哪里设置,可以取消HTML代码与PHP代码之间的空格。

在PHP格式化部分有个white-space 我把里面所有的空格都取消了,没有任何作用。但是在HTML的格式化部分,也没找到类似的功能,大能们帮我想想办法把。


回复讨论(解决方案)

这不是很正常吗?
html 标记中,标记名和属性之间不就是应该有一个空格将他们分开吗?

html之间有空格隔开是正常的,但html和php代码之间有空格,就会造成一些问题,最常见的就是我提出的那个问题

空格是你自己打上的好么。。

>  这样就好了。。。

按 ctrl+shift+f 就自动有空格了

为了整理格式,时不时的都要进行一次格式化

>

空格是你自己打的。。。。。。

看看

看来是软件特性了,没办法解决了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!