"Queries" under arrays with PHP