Help with echo command PHP5

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
dgl
Forum Newbie
Posts: 1
Joined: Sat Dec 19, 2009 6:59 pm

Help with echo command PHP5

Post by dgl »

I am trying to create a text string that includes <item> and </item> in order to generate an xml file.
eg. echo "<item>" . "bicycle" . "</item>";
When I run the script the <item> and </item> disappears and the string returns only bicycle. I assume they are being interpreted as an HTML tag. How do I create a string that would output the 'tags' as part of the ascii string? ie:
<item> bicycle </item>

Thanks
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Help with echo command PHP5

Post by daedalus__ »

Post Reply