Weird Parse Error

I have exactly the same code on different pages except they have 2+ urls in the array and with 2 just doesn’t seem to work… strange :nono:

I get this

Parse error: syntax error, unexpected ‘"’, expecting ‘)’ in /home/infiniti/public_html/pc/features/random.php on line 3

with

<?php 
$urls = array("gameinfiniti.com/pc/battlefield/badcompany/2/"
              "gameinfiniti.com/pc/splintercell/conviction/);
$url = $urls[array_rand($urls)]; 
header("Location: http://$url"); 
?>

Thanks :smiley:

You forgot a double quote and a comma (indicated in red below):

<?php 
$urls = array("gameinfiniti.com/pc/battlefield/badcompany/2/"[COLOR="Red"],[/COLOR]
              "gameinfiniti.com/pc/splintercell/conviction/[COLOR="Red"]"[/COLOR]);
$url = $urls[array_rand($urls)]; 
header("Location: http://$url"); 
?>

oh yea that was a dumb mistake, surprisingly ive tried both fixes, but not at once

thanks