Randomizer

Posted under » PHP 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 '

click here

';

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css