unexpected T_VARIABLE error

Posted on 16th Feb 2014 by admin

Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighestParentName($id = $this->cid){
$cat = mysql_fetch_assoc(fsquery('getParentCategories', $id));
if ($cat['pid']!=0){getHighestParentName($cat['id']);}
return $cat['name'];
}

fsquery is a function defined in another file, which I know is correctly defined and correctly referenced. pid, id, and name are column names in a mysql table. Can someone please help me find what's wrong? Thanks

Other forums