Forum Moderators: coopster
so far i got: preg_replace("/(<img)(.*?)(>+)/i","",$string);
but it's doesn't work. can anybody help please?
[^>] just means, keep matching until you find the ">" character, which should be the end of the tag.
//added you shouldnt really need the parenthesis either...
to keep it simple i tried the following:
<?php $string="... <img src='meis'> ....."; preg_replace("/<img [^>]+>/i","",$string); echo $string; ?>
the image is still in the string, any input would very much be appriciated.
<?php $string="... <img src='meis'> ....."; echo $string = preg_replace("/<img[^>]+>/i","",$string); ?>
I am way too optimistic trying to build a search engine, while i'm still struggeling with basic php syntaxes.