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

Add PHP variable as href link address in echo statement?

PHPz
Release: 2023-09-06 20:10:02
forward
1530 people have browsed it

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

HTML in PHP

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

or

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

HTML in PHP

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

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template