Updated the $data variable to be an array

Made the $data variable an empty array