문제

Is there a way to prevent PHPStorm 6 adding spaces after <?= and before ?> in constructions like

<a href="<?=$variable?>">blah</a>

during Reformat Code (Ctrl+Alt+L) ?

Suddenly, it inserts spaces

<a href="<?= $variable ?>">blah</a>
            ^         ^
            |  here   |  

Googling and digging Settings dialog didn't help.

Thanks.

도움이 되었습니까?

해결책

File->Settings->Editor->Code Style->PHP->Spaces->Within

다른 팁

Try using the trim function in PHP

http://php.net/manual/en/function.trim.php

By telling it to remove whitespace or something that could strip it down to its true value. I'm not too familiar with PHPStorm.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top