I have a array of 3 images
$images
for ($i=0;$i<count($image); $i++) {
array_push($imgArray, $image[i]);
$valString = implode(',', $imgArray);
$setting = $valString;
print_r(settings);
}
o/p: img1.jpg,img2.jpg,img3.jpg
But I wnat the o/p as
{'ad1':img1.jpg,'ad2':img2.jpg,'ad3':img3.jpg}
i.e like a json.
Can anyoe please suggest help.Thanks.
$image
value ? – Niklesh Raut