Hoping someone can help me here. I'm working with someone else's code and
I'm not familiar with ereg_replace(), can someone provide me an alternative
to the following?

ereg_replace("[^a-z0-9._]", "",
ereg_replace (" ", "_",
ereg_replace("%20", "_",
strtolower($original_name))));

Basically, I want to enter $original_name and have it come out $new_name,
converting all spaces to underscores, upper to lowercase, and whatever that
first line does. :)

I've read through the manual and what I got was that preg_replace() is
probably faster... Anyhow, I looked up preg_replace() and as a newbie to
PHP, the given examples look like a language all their own.

Thanks,
Jason


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to