Change Object To Array Php Functions Sql