DEV Community

Discussion on: Laravel php tag not working

Collapse
 
rafaacioly profile image
Rafael Acioly • Edited

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 <?= ...;

<?php foreach($users as $user) {
    ...
}
?>
<?= "Hello world!" ?>