<html>
<head></head>
<body>
<h1>Welcome to Our Website!</h1>
<hr/>
<h2>News</h2>
<h4><?=$data['title'];?></h4>
<p><?=$data['content'];?></p>
</body>
</html>
Can anyone tell me what's the "=" sign before variable names ? I thought of some echo alias but I couldn't find anything, thanks for your help
This tag is interpreted as <?php echo
.
You can check it by writing <?= ?>
, you'll receive error.
<?=$a?>
is the shortcut for <? echo $a ?>
, they are called "short tags" in PHP terminology
Check PHP documentation Escaping from HTML example #2 3rd item, and related ini setting short-open-tag