WP Query with multiple categories – passing an array works?

I understand your confusion but you haven’t something to worry about as behinds the scenes WordPress make all the necessary steps to make it work.

For example, take the following code from the class-wp-query.php

// If querystring 'cat' is an array, implode it.
if ( is_array( $q['cat'] ) ) {
    $q['cat'] = implode( ',', $q['cat'] );
}

Is checking to see if is an array and quickly transform the result to a comma-separated string.

Another way will be using the other options like:

 category__and           An array of category IDs (AND in).
 category__in            An array of category IDs (OR in, no children).
 category__not_in        An array of category IDs (NOT in).

More on this in Category_Parameters

But again I would hold to use the way you find more comfortable.

It perfectly fine to use the array() format if you find it more useful besides this is what make WordPress a fun and useful tool to work on.

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş