"With a chance" Function?
Posted: Mon Nov 06, 2006 4:53 pm
I'm wondering if there is a function in PHP that can be told to perform certain actions with a chance.
For example:
...So that 50% of the time, the said action(s) would happen, but otherwise it would skip to the closing bracket.
If not, I have an alternative using a database, but this would save me a lot of trouble.
Thanks!
For example:
Code: Select all
chance(50%) {
// code here
}If not, I have an alternative using a database, but this would save me a lot of trouble.
Thanks!