random banner script open in new window? [SOLVED]
Posted: Thu Sep 20, 2007 1:34 am
Hi all,
This should be simple. I have the roatating banner script below working fine but im wanting the URL's to open in new window. I just don't know how to do it. In html it is target="_blank" but im not sure in PHP.
My code is as follows.
Any assistance would be greatly appreciated.
This should be simple. I have the roatating banner script below working fine but im wanting the URL's to open in new window. I just don't know how to do it. In html it is target="_blank" but im not sure in PHP.
My code is as follows.
Code: Select all
<?php
$ban1 = "frog.jpg" ;
$url1 = "http://www.frog.com";
$ban2 = "snail.jpg";
$url2 = "http://www.snail.com";
$randomNum = rand (1,2);
$image = ${'ban'.$randomNum};
$url= ${'url'.$randomNum};
Print "<a href=".$url." mce_href=".$url."><img src=".$image." border=0></a>";
?>