$row["e_id"], "title" => $row["e_title"])); } $ajaxResponse = new AjaxResponse($_REQUEST); $ajaxResponse->setResult($buttonObj); $ajaxResponse->send(); //$output = $json->encode($buttonObj); //header("Content-type:text/plain; charset=utf-8"); //echo $output; ?>