easy graphical dice generator in PHP

Just a simple little script which displays two die on screen. The faces are generated randomly, and are text-based, so no images required.





//Required code: This defines the dice array









//End required code



<font face='Lucida Console'>


<table border='1'>



<?php echo $dice[array_rand($dice)]; ?>



<?php echo $dice[array_rand($dice)]; ?>








About Cameron
I'm a final year Computer Science/Information Systems major. Already finished my BA in Politics/Philosophy. I do web and software freelance on the side, while I finish studying. Hoping to be self-employed by the end of my degree, otherwise off into the real-world I go....

3 Responses to easy graphical dice generator in PHP

  1. Pingback: Tweets that mention easy graphical dice generator in PHP « whileloop -- Topsy.com

  2. Robbie says:

    Very cool, I like. Mind if I mention this on my new blog with a reference back to you?

    – Robbie

    • Cameron says:

      No problem. I did acquire it a few years ago, but I can’t remember if I found it intact, or pulled it together based out of multiple sources.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: