Bir göz atın:
for ($i=1; $i<=$nr_of_pics; $i++) {
${'image_src' . $i} = $image_id.'_'.$i;
$img_array = imageSize(${'image_src' . $i}, $i, $category);
}
ve buradan (basitleştirilmiş) ImageSize fonksiyonudur:
$myarr = array();
$myarr['thumb_image_' . $nr . '_width'] = $thumb_width;
$myarr['thumb_image_' . $nr . '_height'] = $thumb_height;
$myarr['image_' . $nr . '_width'] = $width;
$myarr['image_' . $nr . '_height'] = $height;
return $myarr;
The function gets called and OWERWRITES the value of the $img_array inside the foor-loop, but I need it to 'increment' and add values after another in every loop. So basically, it replaces its value every time it loops. What should I do here?
Teşekkürler