note 93655 deleted from function.trim by danbrown
| From: | danbrown@php.net | Date: | Mon, 21 Sep 2009 20:36:04 +0000 |
| Subject: | note 93655 deleted from function.trim by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160902@lists.php.net to get a copy of this message | ||
Note Submitter: kmbarr at example dot com
----
A simpler solution than holek's to removing illegal characters throughout text [not just the
ends]:
$title = preg_replace('/[\000-\037\177-\240]/','',$title);
(actually, to match holek's you would use \237 for the last number rather than \240, but that
would leave HTML hard spaces ascii(160) in the title)