|
 |
PHP...
a powerful, flexible, fully supported, battle tested server side language .. |
|
|
|
PHP is a web language - and you're generating, reading, manipulating HTML... it's what the language was originally built for!
The builtin PHP function htmlentities( ... ) lets you encode your HTML so it displays the `tags` not the actual output for the tags.
For example, this string:
$s = "<h1>Hello World</h1>";
echo( $s );
$b = htmlentities( $s );
echo( $b );
What we want, is special HTML identifiers, like less than and greater than getting replaced with the HTML opcode (< and > ).
The output (showing the raw html passed to the browser):
<h1>Hello World</h1>
<h1>Hello World</h1>
|
|