Zend - The PHP Company




Graphics

Add Code


Strip Images Function  

Type: code fragment
Added by: regexpro
Entered: 08/11/2002
Last modified: 01/11/2001
Rating: - (fewer than 3 votes)
Views: 4221
A little function for stripping images from HTML contained in a variable.


<?
 
  
function strip_img($variable)
{
return(
eregi_replace("<img src=[^>]*>"""
$variable));
}


// Usage (assuming $variable contains some HTML): 

$variable strip_img("$variable"); 
 
?>


Usage Example




Rate This Script





Search



This Category All Categories