Add PHP variable inside echo statement as href link address?



HTML in PHP

echo "<a href='".$link_address."'>Link</a>";

or

echo "<a href='$link_address'>Link</a>";

PHP in HTML

<a href="<?php echo $link_address;?>"> Link </a>

Advertisements