I want to loop through an associate array.
foreach($details as $key=>$value){
echo $details['image1'];
}
Above code works fine.
What i want if i can replace the 1 in $details['image1']
to 2,3,4 ..etc
what i tried
$j=i;
foreach($details as $key=>$value){
echo $details['image.$j'];
$j++;
}
But it does not work. It there a way to dynamically change the key of associate array. like
'$details['image2'];
$details['image3'];'