Date: 02/17/05 (PHP Community) Keywords: php, google I'm in need of a program that will take a number as input and use said input to determine the percentage of time it will return true. Just off the top of my head, without looking at google or even the PHP manual, I'm thinking something simple like generating a random number from 1-100 and subtracting the input number from it. The result would then be tested to if it is equal to or less than 0, at which point it would return false - else, it would return true. Source: http://www.livejournal.com/community/php/261246.html
|