Php Check If Array Of Objects Contains Sql