I am looking to remove a chunk out of a string dynamically, from the occurrence of one character < to the occurrence of another set of 2 characters />. Here's an example of what might be output:
<img src='blah.png' width="300" height="225" />There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slight...
It might not be an img tag, it could be an img inside an anchor tag, or no tags at all. What I'm after is the string after the tags (if any), more specifically the first 50 words. But I have the stripping down to 50 words thing working, i just need the tags ripped out. And I can't cheat and use img {display:none;} as the characters are counted.
Is this possible using PHP?
strip_tags? ar2.php.net/manual/en/function.strip-tags.phpstrip_tagsbut there might be text inside of a tag like an anchor tag, that I don't want in there. Thanx for your input.