cinematic_jesi
02-22-2008, 07:04 PM
Hi--
I know how to replace whitespace at the beginning and end of a string, but I'm not to sure about within? If that makes sense..
I currently have this function:
mkdir("../../gallery/images/" . strtolower($_POST['path']), 0700);
I need it to be able to if $POST['path'] = new folder it would convert it to newfolder. I have to also have the strtolower incorporated because everything has to be lowercase..
Should I be using something like regex? I heard that's not a good, solid method to use though...
Thanks for any help!
I know how to replace whitespace at the beginning and end of a string, but I'm not to sure about within? If that makes sense..
I currently have this function:
mkdir("../../gallery/images/" . strtolower($_POST['path']), 0700);
I need it to be able to if $POST['path'] = new folder it would convert it to newfolder. I have to also have the strtolower incorporated because everything has to be lowercase..
Should I be using something like regex? I heard that's not a good, solid method to use though...
Thanks for any help!