omg omg - 1 year ago 87
PHP Question

What is unexpected T_VARIABLE in PHP?

I get this PHP error:

Parse error: syntax error, unexpected

From this line:

$list[$i][$docinfo['attrs']['@groupby']] = $docinfo['attrs']['@count'];

Is there anything wrong with this line?

Answer Source

There might be a semicolon or bracket missing a line before your pasted line. It seems fine to me, every string is allowed as array index.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download