What does this symbol mean in PHP <?=
What does this symbol mean in PHP <?=
?
Example usage:
<h2>Manage Role: > (<?= $myACL->getRoleNameFromID($_GET['roleID']); ?>)</h2>
It's functionally the same as <?php echo $myACL->getRoleNameFromID($_GET['roleID']); ?>
<?php echo $myACL->getRoleNameFromID($_GET['roleID']); ?>
To add to Mark's answer: The short_tags option must be enabled for the <?=
syntax to be valid. This presents a major portability problem when moving to a server that has this option disabled.
See the PHP Manual for more info on short tags
It's the PHP Short Tag equivalent of printing.
From the PHP INI:
Using short tags is discouraged when developing code meant for redistribution ; since short tags may not be supported on the target server.
See "Are PHP Short Tags Acceptable to Use?" on StackOverflow.
链接地址: http://www.djcxy.com/p/1848.html上一篇: 在PHP中'<= ='是什么意思?
下一篇: 这个符号在PHP中的含义<?=