strip_tags not recognising comments

From: Date: Thu, 24 Aug 2000 15:23:49 +0000
Subject: strip_tags not recognising comments
Groups: php.general 
Request: Send a blank email to php-general+get-13443@lists.php.net to get a copy of this message
hey all, Thanks to those who answered my previous question "split array". I put my solution at the bottom of this mail for those interested (I neglected to say i need to use PHP3). On to the question at hand. Using strip_tags to parse out HTML chokes on comments that include URLS ie: <!-- <a href="NNN">MMM</a> --> gives MMM</a> -- I tried: ereg_replace ("<!--.*-->"," ",$text); before striping the tags but this removes the <title> tag (most likely more than that but this is the obvious fault). Any insight on this? ################################## $ind=0; $newstuff = array(); while (list($i,$v)=each($stuff)) { if (strlen($v)>750) { for($j=0;$j<strlen($v);$j+=750){ $newstuff[$ind++]=substr($v,$j+1,750); } } else { $newstuff[$ind++]=$v; } } ################################## Matthew Luchak Senior Developer Special Projects Mamma.com http://www.62662.com http://www.Mamma.com tel: 514-908-4336 matthew@mamma.com

« previous php.general (#13443) next »