What is wrong in this code i get an empty array. i am passing a php variable to the query it didnt work, when i give a hardcoded value the query returns result.\[code\]echo $sub1 = $examSubject[$i];$subType = $examType[$i];$query = $this->db->query("select dSubject_id from tbl_subject_details where dSubjectCode='$sub1'");print_r($query->result_array());\[/code\]