How can I use the curl_setopt_array function to set multiple options for a cURL session in PHP? Example code: - Biz Tech

How can I use the curl_setopt_array function to set multiple options for a cURL session in PHP? Example code:

Listen
$ch = curl_init();

$options = array(
    CURLOPT_URL => "http://example.com",
    CURLOPT_RETURNTRANSFER => true,
);

curl_setopt_array($ch, $options);

$response = curl_exec($ch);

curl_close($ch);

echo $response;