PHP – remove tag from string | prosoxi.com

Categorized | PHP

PHP – remove tag from string

<?
$content = “this is something with an <img src=\”test.png\”/> in it.”;
$content = preg_replace(“/<img[^>]+\>/i”, “(image) “, $content);
echo $content;
?>

The result is:

this is something with an (image)  in it.



Leave a Reply

Domain Finder

Domain Finder Tool by Truste.gr

read more for domains

Advertisers

Wedstar all about wedding - gamos - γαμος
Κατασκευή ιστοσελίδων
Domain Names | Hosting

Adds