You could use the echo
parameter to return the output into a variable:
$html = wp_dropdown_categories( array( 'echo' => 0 ) );
and then replace
:
echo str_replace( ' ', '', $html );
You could use the echo
parameter to return the output into a variable:
$html = wp_dropdown_categories( array( 'echo' => 0 ) );
and then replace
:
echo str_replace( ' ', '', $html );