Title: HamletDRC's Replies | WordPress.org

---

# HamletDRC

  [  ](https://wordpress.org/support/users/hamletdrc/)

 *   [Profile](https://wordpress.org/support/users/hamletdrc/)
 *   [Topics Started](https://wordpress.org/support/users/hamletdrc/topics/)
 *   [Replies Created](https://wordpress.org/support/users/hamletdrc/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/hamletdrc/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/hamletdrc/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/hamletdrc/engagements/)
 *   [Favorites](https://wordpress.org/support/users/hamletdrc/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How can I display a random comment from a PAGE on my site on home?](https://wordpress.org/support/topic/how-can-i-display-a-random-comment-from-a-page-on-my-site-on-home/)
 *  [HamletDRC](https://wordpress.org/support/users/hamletdrc/)
 * (@hamletdrc)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/how-can-i-display-a-random-comment-from-a-page-on-my-site-on-home/#post-1556433)
 * The previous answers are all subtly wrong.
 * This code:
    `mt_rand(1,sizeof($comments)) - 1;`
 * Will never return the number zero, and never return the first record in your 
   database. The code should be:
    `mt_rand(0,sizeof($comments)) - 1;`

Viewing 1 replies (of 1 total)