How about this instead, Mike? <?php // some code $fortune = mysql_query("SELECT text FROM fortunes ORDER BY RAND() LIMIT 1"); $fortune = mysql_fetch_row($fortune); $fortune = sprintf( '<span class="quotecyc">"%s"<br />-Omniversalism.com</span>', $fortune[0] ); // some more code ?> MySQL is implemented in random code, so it can probably perform this operation faster, and this code is much cleaner. You may want to move away from mysql since it's essentially deprecated. I have switched to mysqli and prefer it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php