base target blank i php..
Jeg skal rette et lille banner php script, så at alle bannere åbner i et nyt vin..HVAD SKAL JEG SKRIVE..?
<?php
$option = "banner";
$sites[0] = array("http://www.bet356.com", "klik her", 1, "250x250bet365.gif");
$sites[1] = array("http://www.partypoker.com", "klik her", 1, "250x250partypoker.gif");
$sites[2] = array("http://www.pokerchamps.com", "klik her", 1, "250x250pokerchamps.gif");
$countsites = count($sites);
for($i=0; $i<$countsites; $i++)
{
for($x=0; $x<$sites[$i][2]; $x++)
{
if($option != null)
{
$mylist[] = array($sites[$i][0],$sites[$i][1],$sites[$i][3]);
}
else
{
echo("Error deciding option.");
exit();
}
}
}
$countlist = count($mylist);
$countlist = $countlist - 1;
$picker = rand(0, $countlist);
if($option == "link")
{
echo("<a href='" . $mylist[$picker][0] . "'>" . $mylist[$picker][1] . "</a>");
}
else if($option == "banner")
{
echo("<a href='" . $mylist[$picker][0] . "'><img alt='" . $mylist[$picker][1] . "' src='" . $mylist[$picker][2] . "' /></a>");
}
else
{
echo("Error deciding option.");
exit();
}
//Created by James Barnsley. All rights reserved.
?>