3 ms·
Yes, that's what I do. I also think it's fine to use omit trailing semicolons and to use short-open tags (I already labelled the file .php --- why do I have to
by combatentropy 10y ago
Yes, that's what I do. I also think it's fine to use omit trailing semicolons and to use short-open tags (I already labelled the file .php --- why do I have to keep saying "php" all over it? And I'm not usually outputting XML.)
<? foreach($x as $y): ?>
<h1><?= h($y->title) ?></h1>
<? endforeach ?>
You just want to make sure to escape all output with htmlspecialchars, or define a shorter function like I did ("h").
- raboukhalil 10y agoI agree!