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

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts

When i am Canseling the Billing Document in VF11 I am getting Shortdump.

Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.

At the minute I:

check for the orig

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

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