note 63360 added to function.utf8-decode
| From: | benny at vh-dr dot com | Date: | Tue, 21 Mar 2006 10:48:06 +0000 |
| Subject: | note 63360 added to function.utf8-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-106143@lists.php.net to get a copy of this message | ||
2ge, thanks a heap! i was about to go crazy over this stuff...
just edited your function a little, to replace whitespaces with +, and changing é and ê to a
plain e.
function urlize($url) {
$search = array('/[\\s]/','/é/', '/ê/', '/--+/',
'/^-+/', '/-+$/' );
$replace = array( '+', 'e', 'e', '-', '',
'');
return preg_replace($search, $replace, utf2ascii($url));
}
----
Server IP: 193.190.198.20
Probable Submitter: 194.78.167.135
----
X-Spam-Status: Yes, hits=7.4 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HEAD_ILLEGAL_CHARS autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php
Edit -- http://master.php.net/note/edit/63360
Del: integrated -- http://master.php.net/note/delete/63360/integrated
Del: useless -- http://master.php.net/note/delete/63360/useless
Del: bad code -- http://master.php.net/note/delete/63360/bad+code
Del: spam -- http://master.php.net/note/delete/63360/spam
Del: non-english -- http://master.php.net/note/delete/63360/non-english
Del: in docs -- http://master.php.net/note/delete/63360/in+docs
Del: other reasons-- http://master.php.net/note/delete/63360
Reject -- http://master.php.net/note/reject/63360
Search -- http://master.php.net/manage/user-notes.php