joining str_replace
Posted: Fri Feb 29, 2008 10:44 am
Can I have the following joined as one complete string rather than having to pass the argument through str_replace twice?
Thanks
Thanks
Code: Select all
<?php $myfile = 'r e move space s';
$fileName1 = str_replace('-' , '_' ,$myfile);
$fileName2 = str_replace(' ' , '_' ,$fileName1);
echo $fileName2; ?>