Trying to insert two dimensional array from database