Question: PHP Simulating Dice Roll I'm working on a dice rolling simulator that randomly generates a number between 1-6 that is stored in a funtion. In

PHP Simulating Dice Roll

I'm working on a dice rolling simulator that randomly generates a number between 1-6 that is stored in a funtion. In the program it will also display the amount of rolls I need. So if I choose to print out 100 rolls, the output should print 10 rows of 10 numbers. And if I choose 200 rolls it will show 20 rows of 10 numbers. I also have to compute the number of each 1-6 side of the dice that was generated and print it below the chart. The value returned is stored in an array

I think it has to look something like this

4 5 1 6 5 6 2 2 3 2

5 4 1 6 6 2 3 6 4 5

6 4 3 6 1 3 3 1 6 5

3 1 4 4 6 2 2 4 2 5

5 2 1 5 3 6 5 4 5 6

1 1 4 2 1 1 4 3 5 4

4 4 2 4 4 2 1 2 3 3

6 4 3 4 4 6 1 1 5 2

6 1 2 5 2 1 4 3 4 1

6 1 2 5 5 5 3 6 4 1

Total:

I can generate 1 row of 10 but I can't create a chart of 10 seperate rows with 10 seperate numbers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!