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

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

please help
HTML Code:

Code: <span id="ctl00"><span>

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Recode Abap Dynpro into Web Dynpro
Hi All,
A client has asked us to look at rearchitecting a custom transaction that was developed

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

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