Hello Community,
A weird code behavior is faced. It might be coding problem. Here is a scenerio.
I am trying to implement auto complete feature using jQuery UI and returning proper json encoded data. Following is a controller call.
Code:
/*Following code works, if I put exit in the end*/
function get_products(){
if (isset($_GET['name'])){
$q = strtolower($_GET['name']);
$this->Product_model->get_product($q);
exit;
}
/*Following code does not work because it does not have exit in end*/
function get_products(){
if (isset($_GET['name'])){
$q = strtolower($_GET['name']);
$this->Product_model->get_product($q);
}
I want to know the difference, it is probably it looks for the view or is there something special which I am missing ?
Regards,
Sam