I think your issue is on line 27. You are using $data[] as a variable but this is not possible like this because you are not referencing an element of the array. Removing the [] would improve things a lot.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.