[SOLVED] str_replace troubles..
Posted: Sun Sep 10, 2006 6:40 am
here is my problem:
$imgurl may = catphotos/cploughmanssmall.gif
But the file will change, hence I want to write some code which will take the small.gif from the end and replace it with large.gif but am having some trouble doing this. Here is my code...
Can someone please tell me what I am doing wrong so that I can learn, appreciate the help.. have tried php.net but cant get much joy out of the function manual.
$imgurl may = catphotos/cploughmanssmall.gif
But the file will change, hence I want to write some code which will take the small.gif from the end and replace it with large.gif but am having some trouble doing this. Here is my code...
Code: Select all
$imgurl = str_replace('%small.gif', 'large.gif', $imgurl);