I have made a race that finds all numbers that 7 can be divided up to 1000. The task is to find out how many of these numbers exist, that is the number. Thus I put all the values into a common number that was 1.
What I'm wondering is how I can show, with simple php coding, how many 1s are being generated, ie something with count or something
Here is the PHP Code i have writen!
You mean you want to find all integers that can be divided evenly with 7 (I don't remember much of modulus)? Create an empty array before the loop, then populate the array with items inside the IF statement. After the loop you can get the number of array items with count().
(BTW I might generally start such counters with $number=0, just for good practice, but in this case I guess $number=7 is lowest possible integer.)
The script is posting lots of "1" to the website. is there a way to count em? Like if it post 15 "1"s it should be a way that the site says "There is 15 1s generated."
I have tried a few things out now and i cant get it working.
(Long time since i have been working with PHP so i have forgoten allot of it.)
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)