Hi Folks, I've spent way to long on this and probably cuz I've not slept well the past few nights. But I'm stuck. I've looked at the preg_replace php manual, and now I'm even more confused. Here is what I want it to do: I want to take "./uploads/wecanhelp" whic is the contents of $folder and make it into just "/wecanhelp" I've tried a number of things but I'm back to my original thought. I've looked through the forum and I'm sure in here some where is my answer but here I am asking for help in here. this is what I'm back to: $data = "./uploads/wecanhelp";// contents of $folder echo "$data <br>";// just echo out something $find ="./uploads/"; //this is what I'm looking for $replace ="/"; //this is what I want to replace it with. echo preg_replace ($find, $replace, $data); //this should give me my result Any help much appreciated. Regards Rick
preg_replace is just for regular expressions (which are not needed in this case). Leave your current code as it is, just use str_replace() instead of preg_replace(). www.php.net/str_replace
Thanks to both of you, they both work, I hoped this was going to be easy, my eyes are blood shot and there you have it,, I owe you both a beer. Thanks Rick