What does '


Question

<?php

$a=1;

?>
<?=$a;?>

What does <?= mean exactly?

1
134
1/7/2010 1:47:34 PM

Accepted Answer

It's a shorthand for <?php echo $a; ?>.

It's enabled by default since 5.4 regardless of php.ini settings.

196
6/23/2015 10:17:37 AM

It's a shorthand for this:

<?php echo $a; ?>

They're called short tags; see example #2 in the documentation.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon