Hello Everyone,

Thanks for reading, I have a string containing the html content of another file on my server, the content of this file is different depending on the $_GET['id'] as it's a PHP file.

However, this file contains <div> tags and other things which mess up the result of the page I'm working with...

My question is, how can I only get images and plain text from a string and echo out just those without any other tags, etc?

Thanks alot,

Daniel

Member Avatar for diafol

preg_match() and preg_match_all() may be a good place to start.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.