What does a special set of tags = and ?> do in PHP?
Posted by Raj
What does a special set of tags <?= and ?> do in PHP?
<?= and ?> tags called as short tag in php .The output is displayed directly to the browser.
<?= only works if PHP's short open tags is turned on.
?> is PHP closing tag.
Example:
<?
PHP code ...
?>
PHP Syntax:
<?="Hello Rajesh Sharma!"; ?>
<? echo "
Hello Rajesh Sharma! "; ?><?php echo " Hello Rajesh Sharma! "; ?>
<?php echo "
Hello Rajesh Sharma! "; ?>
is the same as:
<?= " Hello Rajesh Sharma! " ?>
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
for web developers,
in php,
PHP,
PHP interview questions and answers,
scripting in php,
tag,
tag it,
tagged,
tags and,
the tags
.You can leave a response, or trackback from your own site.