Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ignoring tags 1

Status
Not open for further replies.

manicleek

Technical User
Jun 16, 2004
143
GB
Me again

I'm just wondering how I can get PHP to ignore html tags on output from a db.

E.G.

say I'm outputting a news story from a db that has image source in tags embedded in the text but I don't want to show the images on the output page
 
Code:
echo striptags($variable);

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Or
Code:
echo htmlentities($variable);
if you want to display the tags.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top