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

How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

Which PHP-Editor do you think is the best?
Hi everyone,
Myself Brian Anderson. For the last 2 years i have been working a

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

DELETE FROM not working deletes wrong row
Hello

I have the following code which i found but it doesnt work properly.. it comes up with

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

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