This should do it (not error checked though)
<?php
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
if ($result=mysql_list_tables($db))
{
while ($row=mysql_fetch_row($result))
{
$table[]=$row[0];
}
$tnum = rand(0,count($table)-1);
echo $table[$tnum];
}
else
{
die ("Couldn't List Tables??");
}
?>