php echo data using <?=

Possible Duplicate:
Are PHP short tags acceptable to use?

I have a question using

<?=$info ?> rather than <?php echo $info ?> when is <?= appropriate to use or has it be deprecated with 5.0


<?=必须在配置文件中标记为启用,它是可选语法,我认为...


请注意,如果您将代码移至另一台禁用了短标签的服务器,则可能需要执行大量工作。


If you have the short_open_tag configuration setting enabled, you can use this. Generally, short tags are looked down upon, for readability and compatability's sake (if this is disabled by default in a later version, if you have to move your website to another server where this option is disabled, etc.)

However, if you can use it, it's not bad to use at all. If all you need to do is echo something, then use it if you wish.

链接地址: http://www.djcxy.com/p/59442.html

上一篇: <?=快捷方式的兼容性

下一篇: php使用<?=来回显数据