note 63360 deleted from function.utf8-decode by bjori
| From: | bjori@php.net | Date: | Wed, 02 Aug 2006 12:57:32 +0000 |
| Subject: | note 63360 deleted from function.utf8-decode by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115455@lists.php.net to get a copy of this message | ||
Note Submitter: benny at vh-dr dot com
----
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));
}