RE: [PHP] formatting a filename

2002-09-05 Thread Mike richardson
Sent: Thursday, September 05, 2002 9:34 AM To: Javier Montserat Cc: [EMAIL PROTECTED] Subject: Re: [PHP] formatting a filename On Thu, 5 Sep 2002, Javier Montserat wrote: > i want to format the filename of an uploaded file as follows :- > -- replace blankspace with "_" > --

Re: [PHP] formatting a filename

2002-09-05 Thread Rodolfo Gonzalez
On Thu, 5 Sep 2002, Javier Montserat wrote: > i want to format the filename of an uploaded file as follows :- > -- replace blankspace with "_" > -- remove any illegal characters. > Which string functions should I use to do this? http://www.php.net/manual/en/function.ereg.php http://www.php.net/m

Re: [PHP] formatting a filename

2002-09-05 Thread Marek Kilimajer
I use this, it includes also national characters $name=strtr( $name, "`O}ao~¾YYµAÁÂAÄAAÇEÉEËIÍÎI?NOÓÔOÖOUÚUÜÝßaáâaäaaçeéeëiíîi?noóôoöouúuüýy *!@#$%^&()+=", "SOZsozlYYuAAACDNOOYsaaaconooyy_"); Javier Montserat wrote: > i want to format the file

RE: [PHP] formatting a filename

2002-09-05 Thread Jay Blanchard
[snip] i want to format the filename of an uploaded file as follows :- -- replace blankspace with "_" -- remove any illegal characters. Which string functions should I use to do this? [/snip] http://www.php.net/manual/en/function.eregi-replace.php HTH! Jay -- PHP General Mailing List (h

Re: [PHP] formatting a filename

2002-09-05 Thread Justin French
check out preg replace in the manual... particularly example 3 of this page: http://www.php.net/manual/en/function.preg-replace.php personally, i'd replace anything other than a-zA-z0-9 with _ Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] formatting a filename

2002-09-05 Thread mhe
Here is a function that is used in the My_eGallery modules for PHP nuke. function find_nom_dif($nom) { $nom=stripslashes($nom); $nom=str_replace("'","",$nom); $nom=str_replace("\"","",$nom); $nom=str_replace("\"","",$nom); $nom=str_replace("&","",$n

[PHP] formatting a filename

2002-09-05 Thread Javier Montserat
i want to format the filename of an uploaded file as follows :- -- replace blankspace with "_" -- remove any illegal characters. Which string functions should I use to do this? Thanks, Javier _ Join the world’s largest e-mail