Showing posts with label scripting in php. Show all posts
Showing posts with label scripting in php. Show all posts
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! " ?>