replace problem
Posted: Sat Jan 01, 2011 8:37 pm
hello and a happy new year 
i have a little problem and my english and php is not the best but i try to explain my question
i get the following code from my database:
i only save the path for the HQ-Picture into the database. in my imagefolder are also thumb_picname-1.jpg and crop_picname-1.jpg
i need a variable that replace the
into
i want to realize it at the second slash..
is it possible to search for the 2nd slash and replace it with /thumb-
from
picfolder/picname/thumb_picname-1.jpg
to
picfolder/picname/thumb_picname-1.jpg
i thank you for your help!
best regards
i have a little problem and my english and php is not the best but i try to explain my question
i get the following code from my database:
Code: Select all
$path = picfolder/picname/picname-1.jpgi need a variable that replace the
Code: Select all
$path = picfolder/picname/picname-1.jpgCode: Select all
$thumbpath = picfolder/picname/thumb_picname-1.jpgis it possible to search for the 2nd slash and replace it with /thumb-
from
picfolder/picname/thumb_picname-1.jpg
to
picfolder/picname/thumb_picname-1.jpg
i thank you for your help!
best regards