Simple dice number with PHP

Views: 6 Last modified: August 03rd, 2011 Comments: 0

This is a very simple way to imitate the result number after throwing an dice.

<?php
// Seed
mt_srand(implode('', array_reverse(explode('.', microtime(true)))));

// Show the number
echo mt_rand(1, 6);
?>
VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

    Mail this!

    To: From:Sum {3+8} =  
    Anything to add ?

        You must be logged in to post a comment.