I am not sure if I would make any sense in asking this but I have a model:
function update_profile_image($id, $image, $data){
$data1=array('profile_thumb'=> $data['images_urls'][$index]);
$this->db->where('property_ref_id',$id);
$this->db->update('vbc_property_images',$data1);
}
Here $data is an array:
Array
(
[images_urls] => Array
(
[0] => property_image_11.png
[1] => property_image_13.png
[2] => property_image_14.png
)
)
And $image in model is the name of any image in this array, e.g. 'property_image_13.png'.
I am trying to do something where I can get key value like $index([0], [1]..) by $image so that in my query it will automatically detect which image was selected.
Please help.