note 93655 added to function.trim
| From: | kmbarr at example dot com | Date: | Mon, 21 Sep 2009 20:32:13 +0000 |
| Subject: | note 93655 added to function.trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160901@lists.php.net to get a copy of this message | ||
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)
----
Server IP: 64.71.164.2
Probable Submitter: 155.70.39.45
----
Manual Page -- http://www.php.net/manual/en/function.trim.php
Edit -- https://master.php.net/note/edit/93655
Del: integrated -- https://master.php.net/note/delete/93655/integrated
Del: useless -- https://master.php.net/note/delete/93655/useless
Del: bad code -- https://master.php.net/note/delete/93655/bad+code
Del: spam -- https://master.php.net/note/delete/93655/spam
Del: non-english -- https://master.php.net/note/delete/93655/non-english
Del: in docs -- https://master.php.net/note/delete/93655/in+docs
Del: other reasons-- https://master.php.net/note/delete/93655
Reject -- https://master.php.net/note/reject/93655
Search -- https://master.php.net/manage/user-notes.php