i have use following code to skip image tag from string ,
how do i skip image and video both ??
The following code skip image tag.
use code:
$content = $row['Description'] ;// comes from database table
$content = preg_replace("/<img[^>]+\>/i", " ", $content);
echo $content;
Within one single
preg_replace()(untested)Alternative which should definitely work, but doesn’t look very nice
edit
Maybe you should also disallow
<embed>, wich is used to embed .swf files.