PHP - excel to array helper function