How could I

print();

the '<' and '>' signs? You can't escape character them ('\')


Say, for example, I wanted to Print();

"The <font> tag is awesome"

It would print out:

"The tag is awesome"

Thanks,
Mitch

Put your output in a string.

$test='The <font> tag is awesome';
print $test;

Use HTMLEntities() function.

Put your output in a string.

$test='The <font> tag is awesome';
print $test;

That didn't help...

And, what is the HTMLEntities funtion?

Try this :

<?php
$new = htmlspecialchars("'The <font> tag is awesome'", ENT_QUOTES);
echo $new; 
?>

Thanks vibhadevit

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.