<?php function a($a) { ?> <p><? echo $a?></p> //echo variable content // <? ?> is allowed only if you have **Enabled short_tages in php.ini file** <?php } ?>
Include short_tages in php.ini file
<? $a="stackoverflow"; function a($a) { ?> <p><?= echo $a?></p> <? } a($a); ?>
If you try to run this program using <?= , This will not allow it to give you an error
Parse error: syntax error, unexpected T_ECHO <?= is not allowed in php for tags <? is allowed if Set short_open_tag=On in php.ini
source share