Hi,
Can you explain that for me ?
| SitePoint Sponsor |




Hi,
Can you explain that for me ?
It's shorthand for;
PHP Code:<?php echo $msg_5048; ?>




thanks mate
Thats the other syntax for the term "echo"





Some servers have the option turned off, so it decreases your application's portability, and can be a potential security issue if you tried to use it with the short tags option turned off.
A lot of servers turn it off because the '<?' without the 'php' afterwards can get confused with the XML document 'prolog', which also starts '<?'.
I find short tags fantastically useful for templates, e.g.;
But in 'normal' PHP, I use the full <?php ... ?> tags.PHP Code:<h2>My shoes</h2>
<? foreach($visitor->shoes AS $shoe): ?>
<p><?= $shoe ?></p>
<? endforeach; ?>

Bookmarks