On Aug 3, 2006, at 2:18 PM, anarchitect wrote:
>
> Good afternoon everbody, i have some troubles turning special
> characters into "clean characters" to use for a slug (read: clean url
> string). I am running a str_replace() over the data that i receive
> from
> the model, yet it seams that special characters (such as öäü...) are
> encoded in something special, so that str_replace() won't work.
>
> $title = $entry['Post']['title'];
> $title = strtolower($title);
> $umlaute = array ("ü", "ö", "ä", "ß");
> $replace = array ("ue", "oe", "ae", "ss");
> $title = str_replace($umlaute, $replace, $title);
> $title = preg_replace("/\W/", "", $title);
> $entry['Post']['slug'] = $title;
>
> Any hints how i could turn de-code them from the model?
>
> Thanks for any help
Can you use urlencode()?
-- John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---