Link" in PHP; or echo "Link"; PHP in HTML">Link<"/> Link" in PHP; or echo "Link"; PHP in HTML">Link<">

Home  >  Article  >  Backend Development  >  Add PHP variable as href link address in echo statement?

Add PHP variable as href link address in echo statement?

PHPz
PHPzforward
2023-09-06 20:09:071448browse

在echo语句中添加PHP变量作为href链接地址?

HTML in PHP

echo "<a href=&#39;".$link_address."&#39;>Link</a>";

or

echo "<a href=&#39;$link_address&#39;>Link</a>";

HTML in PHP

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

The above is the detailed content of Add PHP variable as href link address in echo statement?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete