remove spaces
Posted: Thu Oct 02, 2008 11:24 am
<?
$folder_name = $_POST['name'];
mkdir("/path/$folder_name", 0777);
?>
i think the above code makes a directory as the user inputs the folder name...
Now, what i want is, if the user gives space in between the text like "my design works" then i want this text to renamed to "my_design_works"
..
so how to do that??
and if that folder exists then i want the new folder to be renamed automatically with new name...
i know i m very bad at PHP so..
waiting for your help guys....
$folder_name = $_POST['name'];
mkdir("/path/$folder_name", 0777);
?>
i think the above code makes a directory as the user inputs the folder name...
Now, what i want is, if the user gives space in between the text like "my design works" then i want this text to renamed to "my_design_works"
..
so how to do that??
and if that folder exists then i want the new folder to be renamed automatically with new name...
i know i m very bad at PHP so..
waiting for your help guys....