Jump to content

unexpected T_VARIABLE error


Kestrad

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/185042-unexpected-t_variable-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.