I got the following array. now I get the single records but when is their array records then it doesn't work. I tried with OR condition but it doesn't work.
$this->db->get_where('genre',array('genre_id'=>$row['genre_id']))->row()->name;
//I get Follwoing Records
Array(
[0] => Array
(
[movie_id] => 7
[title] => Raaz
[genre_id] => 8 // it display the name
[actors] => []
[trailer_url] => https://drive.google.com/
)
[1] => Array
(
[movie_id] => 8
[title] => Tribute
[genre_id] => ["2","5","20"] // it doesn't display the name
[actors] => []
[trailer_url] => https://drive.google.com/
)
I tried the following code
$this->db->get_where('genre',array('genre_id'=>$row['genre_id']))->row()->name;
above code works for 0 index but it doesn't work 1 index array