Page 1 of 1

[SOLVED] Silly parse error

Posted: Wed Jan 05, 2005 2:20 pm
by kzar
I have been staring at this for a while now and just can't see the problem. This is the line thats causing problems.

Code: Select all

if ( ($Slot[$k][DayID] == Day[$i]) && ($Slot[$k][TimeID] == Time[$j]) )
The error I'm getting is "Unexpected [" but I can't see the problem

Posted: Wed Jan 05, 2005 2:22 pm
by rehfeld
Day[$i]

should be
$Day[$i]



you did that twice


also, you should use quotes around your litteral array indices.

$Slot[$k][DayID]

should be

$Slot[$k]['DayID']

Posted: Wed Jan 05, 2005 4:08 pm
by kzar
thanks, i knew it would be somthing dumb