$imagesarray[]=explode('&',$data[5]);
$imag_temp = 0;
foreach($imagesarray as $image){
if($imag_temp == 0 )
{
$this->db->query("UPDATE " . DB_PREFIX . "product SET image = 'media/" . $image[0] . "' WHERE product_id = '" . (int)$product_id . "'");
}else{
foreach($image as $img){
$this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET image = 'media/" . $img . "' , product_id = '" . (int)$product_id . "'");
}
}
$imag_temp++;
}
This is my $data[5]=Arizona Diamondbacks.png&arizona-cardinals.png&Atlanta Braves.jpg&...&...&...n number can have..
$imagesarray[]=explode('&',$data[5]);