Can someone give me idea on how to remove image url? For example when i click on the news link..the news information will come out..In the news information page, i only want text.I dont want to display the image. How can i figure out the image.Cause my problem is.. the new details content came from the dbase which is not in my server. I cant delete the URL manually in the server..It need alotof work.at the same time im sharing the same database with other website related.

9 Years
Discussion Span
Last Post by sagedavis

you do not need to figure out the image actually..

Rather than thinking about what html tags you do not want to allow, just think about the ones that you do want to allow.

PHP has a native function to do all of this.

Before displaying the content of your page process it using the following

$description = strip_tags($description, '<b><p><a>');

Here, I told the variable $description to not have any tags other than the B P and A tags. All other tags will be stripped out.
Use this method on any and all variables which might have image tags that you do not want, but remember to add as the second argument, those tags that you do want.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.