Re: stripping html tags

From: Date: Sun, 05 Jun 2005 17:18:02 +0000
Subject: Re: stripping html tags
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216418@lists.php.net to get a copy of this message
* Dotan Cohen <dotancohen@gmail.com>: > I took this example from php.net, but can't figure out where I went > wrong. Why does this: > $text = preg_replace("/<head(.|\s)*?>(.|\s)*?<\/head>/i" , "" , > $text); > > throw this error: > syntax error at line 265, column 39: > $text = preg_replace("/<head(.|\s)*?>(.|\s)*?<\/head>/i" , "" > , $text); > ======================================^ > > It seems to be pointing to the 'e' is 'head'. Why? Thanks. Why are you using regexes instead of strip_tags()? -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association | http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:matthew@garden.org | http://vermontbotanical.org

« previous php.general (#216418) next »