Possible Duplicate:
Are PHP short tags acceptable to use?
I was looking at some sample code and I noticed that the code used
<?=
instead of
<?php
as opening tags, the closing tags were the same as usual, but I was just wondering if there is any different functionality between the two? The file extension of the sample code is also .phtml instead of .php
<?= is not the same as <?php
<?= is the same as <?php echo
<? is the same as <?php
<?= is shorthand for <?php echo ...
It's used like so:
<?=$var1?>
instead of:
<?php echo $var1; ?>
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