I get no parse errors with this code:
<?php
$urls = array(
"http://www.affiliateurl1.com",
"http://www.affiliateurl2.com",
"http://www.affiliateurl3.com",
"http://www.affiliateurl4.com");
$url = $urls[array_rand($urls)];
$destination = "Location: $url";
header($destination);
?>