printing string with tags

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yaron
Forum Contributor
Posts: 157
Joined: Fri Aug 22, 2003 8:40 am

printing string with tags

Post by yaron »

Hi,
I have strings that are between tags:
<tagname bla bla bla bla bla></tagname>

when I try to print that the browser takes that as an actual tag and not a string and I get a blank result...
Is there a way around that?

Thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You want to print out the tags?

Code: Select all

echo htmlspecialchars($string);
Mac
Post Reply