What best practices should be followed when concatenating GET parameters in PHP?

When concatenating GET parameters in PHP, it is important to properly encode the values to prevent any security vulnerabilities or unexpected behavior. One common method is to use the `http_build_query` function to safely concatenate the parameters into a query string.

// Example of concatenating GET parameters using http_build_query
$parameters = array(
    'param1' => 'value1',
    'param2' => 'value2',
);

$queryString = http_build_query($parameters);

// Output the concatenated query string
echo 'http://example.com/api?' . $queryString;