
Untitled
By: a guest on
May 10th, 2012 | syntax:
None | size: 0.58 KB | hits: 12 | expires: Never
//images can be the following:
classic-stable-bevan-white.png
classic-stable-blake-white.png
heritage-stable-arlington.png
heritage-stable-amersham.png
//My Problem
I need to replace anything with -white.png on the end, with just.png
So classic-stable-bevan-white.png -> classic-stable-bevan.png
Anything without -white.png needs to have *.png appended
So heritage-stable-amersham.png -> heritage-stable-amersham*.png
My code so far is:
strtolower(str_replace('.png','*.png',(str_replace(' ', '-', 'http://localhost/test/uploads/doors/scaled_'.$door->getImage1()))));