On some platforms with some versions of MySQL RAND() is broken, try running the query twice, sometimes that fixes it.
mysql_query ("SELECT * FROM whatever ORDER BY RAND()");
Then do it again and use the second result:
$result = mysql_query ("SELECT * FROM whatever ORDER BY RAND()");
$array = mysql_fetch_array ($result);
print_r ($array);