$req = mysql_fetch_assoc(mysql_query("SELECT text FROM table ORDER BY rand() LIMIT 1")); echo $req['text'];