you have multiple php syntax errors in your code. Sorry but you have alot of things backwards in your code, I can try to help but you must posses at least general php knowledge to be able to use this ajax framework without much pain, I am not going to teach php.
Here I fixed the syntax for you. Also your html element HAVE TO exist in the view.
The 'blad' and 'lol' are in the parameter for element/div id in which the response is loaded to.
You only need to do $ajax = ajax() once (per scope).
there is some filtering going on and some of the code is being obfuscated/truncated, I'll reply the code to your email.
Code:
$ajax = ajax();
?>
<div class = "subj-nav">
<?php
if(isset($catg_data)) {
foreach($catg_data as $catg) {
?><a href ='#' id = 'catg<?php echo $catg['><?php echo $catg['catg_name'];?></a><?php