Re: Replace illegal filename chars???

From: Date: Thu, 24 Oct 2002 10:31:17 +0000
Subject: Re: Replace illegal filename chars???
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-121222@lists.php.net to get a copy of this message
yes, that would be easier, but I usualy just want to convert ' ' to '_', my national characters to coresponding ascii chars and so on, so the name still has some meaning Maxim Maletsky wrote:
Use a regular expression like: $str = ereg_replce("/[^[:alnum:]]/i", '', $str); -- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners
www.maxim.cx         // my Home
// my Wish List:     ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 Marek Kilimajer <kilimajer@webglobe.sk> wrote... :
I use strtr() for this Shawn McKenzie wrote:
Anyone have a good way to remove from a string all characters and spaces that are illegal in a filename??? $string = "What's up Doc?"; I need: $filename = "whatsupdoc"; TIA -Shawn
     
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#121222) next »