- array_rand: documentation ( source)
- printf: documentation ( source)
<?php
$links = array(array('url' => 'http://google.com', 'name'=>'google'),
array('url' => 'http://hotmail.com', 'name' => 'hotmail'),
array('url' => 'http://hawkee.com', 'name' => 'Hawkee'));
$num = array_rand($links);
$item = $links[$num];
printf('<a href="%s" title="%s">%s</a>', $item['url'], $item['name'], $item['name']);
?>