phpdevelopersolutions

Saturday, 20 February 2016

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;
?>
Posted by suraj at 02:00 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2024 (1)
    • ►  March (1)
  • ►  2017 (1)
    • ►  December (1)
  • ▼  2016 (3)
    • ►  June (1)
    • ▼  February (1)
      • PHP - remove tag from string
    • ►  January (1)
  • ►  2014 (2)
    • ►  October (1)
    • ►  June (1)
  • ►  2013 (9)
    • ►  December (2)
    • ►  August (4)
    • ►  July (3)

About Me

suraj
View my complete profile
Picture Window theme. Powered by Blogger.