Generate multiple tag query URLs

$url = parse_url( $your_url );
$query = $url['query'];

$args_arr = array();
parse_str( $query, $args_arr );

if( isset( $args_arr['param'] ) ) {
    $query_string = $args_arr['param'];
    $query_string .= ',value2';
} else {
    $query_string = 'value2';
}

add_query_arg( 'param', $query_string );

That’s completely untested, but you get the concept. Basically, wordpress is gonna want to replace what you have set in param, so you need to get what you have in param, then add what you want to add to it. You can definitely make that into a function if you want to, depends on your usage case.

error code: 521