> for ($i ; $i <
> $count ; $i++)
The error is probably your for loop. You need to tell it where to start:
for ($i = 0; $i < $count, $i++)
{
}
I haven't looked into yor code any further, I'm pretty sure your error lies
there.
Regards
Kristian