model returned a result array
public function check($date,$route){
$query3=$this->db->query("SELECT SEAT_NO FROM TICKET WHERE ROUTE='".$route."' AND DTE='".$date."' ");
return $query3->result_array();
}
in controller
$data=$this->booking_model->check($date,$route);
now i need to check whether a value/string(for example "A") exist in $data array. the below code is not working.
if (in_array("A", $data)){
//code
}else{
//code
}