test";"."/> test";".">
Home > Article > Backend Development > How to add hyperlink in php language
How to add hyperlinks in php language?
There are several ways to write HTML code (including hyperlinks) in PHP programming.
First, write directly, but write it outside the PHP code block.
For example:
<a href='xxx'>test</a>
Second, use echo to output directly in the PHP code.
For example:
echo "<a href='xxx'>test</a>";
Third, use the latest function of PHP5 "new string" to output.
For example:
$str=mark<<< <a href='xxx'>test</a> mark; echo $str;
All html codes or other strings between mark<<< and mark; can be written freely. These will be assigned to the $str variable and finally output. The $str variable is enough, and mark is like a pre-formatted tag in HTML. This is also the power of PHP. It is very considerate to programmers, knows what programmers need, and knows how to make programming more convenient and faster for programmers.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of How to add hyperlink in php language. For more information, please follow other related articles on the PHP Chinese website!