Knowing that:
$str = $row_ultimos_posts['conteudo'];
I have this code:
echo preg_replace("/<iframe[^>]+\>/i", "",$str);
And I have this code:
preg_replace ("/<img(.+?)>/", "",$str);
How can I use both codes? How to merge it to work?
Knowing that:
$str = $row_ultimos_posts['conteudo'];
I have this code:
echo preg_replace("/<iframe[^>]+\>/i", "",$str);
And I have this code:
preg_replace ("/<img(.+?)>/", "",$str);
How can I use both codes? How to merge it to work?
preg_replace("/<iframe[^>]+\>/i", "",preg_replace ("/<img(.+?)>/", "",$str));
You can basically wrap them in a function like
function foo($str)
{
$str = preg_replace("/<iframe[^>]+\>/i", "",$str);
$str = preg_replace ("/<img(.+?)>/", "",$str);
return $str;
}