DD&C Home Home / Home Office Small-Medium Business Large Enterprise Client Services Downloads Specials Shopping  
DD&C Support
Computer Support, Help and Information
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how do I force literal display in data returned from script?

 
Post new topic   Reply to topic    DD&C Support Forum Index -> Web Languages
View previous topic :: View next topic  
Author Message
darktooth



Joined: 24 Jan 2006
Posts: 1

PostPosted: Tue Jan 24, 2006 9:43 am    Post subject: how do I force literal display in data returned from script? Reply with quote

I am trying to display information returned from php script. The problem I am having is that the data the script returns <CG>Darktooth, <CG>Zenagon, etc. and I can not get my webpage to display the <CG> part. It is being treated as a tag I guess....how do I force my webpage to treat the <CG> part as a literal and not a tag. Here is the code that loops through the array returned from the php script.


foreach ($data['players'] as $p) {
print $p['name'];
};


Any help is greatly appreciated
Back to top
View user's profile Send private message
Dave
Site Admin


Joined: 13 Jan 2006
Posts: 83

PostPosted: Tue Jan 24, 2006 9:46 am    Post subject: Reply with quote

The htmlentities () command is what you need. You need to convert those special characters into their HTML safe versions. So..

foreach ($data['players'] as $p) {
print htmlentities($p['name']);
};
_________________
-Dave
http://spyware.dugancom.com
http://www.articlemotron.com
http://homeimprovement.divinfo.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sunmon



Joined: 07 Sep 2006
Posts: 1
Location: USA

PostPosted: Thu Sep 07, 2006 12:10 pm    Post subject: Reply with quote

Where you get it???
_________________
How To Seduce Your Wife
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DD&C Support Forum Index -> Web Languages All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
DD&C Support  


Powered by phpBB © 2001, 2005 phpBB Group