$string = 'folder1:image1.jpg|folder2:image2.jpg|folder3:image3.jpg';
I need to explode the string to get the following result:
<img src="/folder1/image1.jpg" />
<img src="/folder2/image2.jpg" />
<img src="/folder3/image3.jpg" />
It's not a problem with one delimiter but I have two delimiters and don't know how to do it:
$imagedata = explode("|", $string);
foreach($imagedata as $image) {
echo "$image<br />";
}