2018-08-07, 23:42:03
(2015-03-11, 23:51:02)shawn_a Wrote: nono use foreach much easier to write and read, and faster then counting each iteration ( and your missing quotes )
PHP Code:$images = explode('||', get_special_field_image('image'));
foreach($images as $image){
echo '<img src="'.$image.'">';
}
and if you need $i for index or something
PHP Code:foreach($images as $key=>$image){
// echo $key; // zero based index
echo $key.'<img src="'.$image.'">';
}
Hello!
I tried using this foreach snippet and it works just fine.
But is there a way to also get the thumbnail for the image somehow?
I would need something like this:
$images = explode('||', get_special_field_image('image'));
foreach($images as $image){
echo '<a href="'.$image.'"><img src="'.$thumbnail.'"></a>';
}