File->Settings->Editor->Code Style->PHP->Spaces->Within
PHPStorm Code Style: PHP in HTML
-
30-03-2022 - |
Question
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.
La solution
Autres conseils
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.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow