function updatePhone($number, $type, $idcontact_phone) { $cp_phone = new ContactPhone(); $cp_phone->getId($idcontact_phone); // Primarykey id of the record to update $cp_phone->phone_number = $number; $cp_phone->phone_type = $type; $cp_phone->update(); }