$city = $_GET['cityselect'];
add_query_arg( array ( 'city' => $city, 'key' => 'value' );
Basically i want to check if $city exists and if not i want to remove both key and value, ie 'city' => $city, (comma included). So the output would be:
add_query_arg( array ( 'key' => 'value' );
Any idea?
Only add the
citykey if it is set, like this: