Removing HTML 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
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Removing HTML Tags

Post by AliasBDI »

I am pulling some records out of a database to dynamically fill the <title> tag in the page. The record has HTML tags in it that should not show up. Is there a way to remove all HTML tags in PHP?
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post by trukfixer »

http://us2.php.net/manual/en/function.strip-tags.php

helps to RTFM .. outta bookmark php.net . its where all of us go too :) and it has search capability for functions, or search whole site .. google is your friend, :)
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Post by AliasBDI »

Thanks. Works perfectly and good to know!
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

feyd wrote a smarter strip_tags() function, i believe it's in the useful posts topic
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

in my signature :P
Post Reply