Forum Moderators: coopster

Message Too Old, No Replies

String to filename-friendly-string

Clean string from special characters

         

fromholland

6:26 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



I've got a database whith titles of pages and I want to use them in my filenames (with Modrewrite). But, I have to use a function to convert them to filename-friendly-strings.

e.g.
title:"What's thàt!?" should become something like:
whats-that(.html)

title:YOU & M€ should become you-m.html [ignoring strange characters]

Someone who has got that function?

jatar_k

6:31 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I actually picked one up from the comments on php.net
[php.net...]

fromholland

6:44 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



Thank you SO much! This saves a lot of time for me and CPU of my server :)