Generate URL with parameters from an array

All you need is http_build_query:

$final = $url . "?" . http_build_query($subids);

Leave a Comment