> im reading in a string from a database, this string will become a file > name. > so i need to strip everything BUT lowercase a-z and 0-9. well im > strtolower > so i dont need to worry about upper case. blank spaces get replaced with _
$filename = preg_replace("/[^a-z0-9]/","_",$data); Replace _ with whatever you want to replace anything that's not (^) a-z or 0-9. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php