Posted under » PHP » Python on 22 March 2012
You can do this thru array_rand command.
$ad_row1 = array(
1 => array('url' => 'http://heh.edu.sg/', 'img' => 'webtools_depth.jpg'),
2 => array('url' => 'http://hoi.edu.sg/', 'img' => 'webtools_click.jpg'),
);
$ad1 = array_rand($ad_row1);
echo '';
For python, you can try this.