Hi devs! I'm currently learning Laravel and I find that php tag <?php
is not working, but the <?=
tag works perfectly. I searched for some explanations but could not find any. I always prefer the first tag than the latter.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
the tag
<?=
is equivalent an<?php echo ...
, so if you want to write some logic use<?php ...
and if you just want to show something you can write<?= ...
;Are you doing an echo?
Pretty sure it has happen to all of us at some point! No stupid questions :)