What is the difference between
<?php echo '$test'; ?>
and
<?=$test?>
?
The former outputs the literal string $test and the latter outputs the value $test.
Assuming you really meant <?php echo $test; ?>, the two are effectively the same thing. The question is, how portable do you want to be. <?php ?> is supported just about anywhere that PHP is supported, however lots of admins disable <?= ?> syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With