I have two values(bookingId) in index array and now i want to update query using these values but right now unable break array in loop, I want to run update query (according to count values in array) Here is my code,Where i am wrong ?
$bookingIds; // contaning two values 176,190
$counts = count($bookingIds); // counting array values
for ($x = 1; $x <= $counts; $x++)
{
$data = array('approved' => "1");
$this->db->where('bookingId', $bookingIds);
$this->db->update('notifications', $data);
}