unexpected T_VARIABLE error


Posted on 16th Feb 2014 07:03 pm 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

No comments posted yet

Your Answer:

Login to answer
333 Like 18 Dislike
Previous forums Next forums
Other forums

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,

I am overwhelmed with questions on how to migrate huge volume of Sales Orders

(sub)screen resize modification doesn't work after ECC 6 EhP 4 installation
Hello,

We have previously extended the size of the custom data tab on PO transaction ME23

Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

SCRIPT ERROR
Here is the CONTACT FORM I made for our website:

<form id="form1" name="

How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash