Quote:
Originally Posted by Opserty
Edit whoops I made a mistake with the rand options should be: [minicode]rand(0, 3)[/minicode] instead of 4
2). rand generates a random number (in this case between 0 and 3 inclusive) 0 is evaluated as false in a condition whilst any other number would be true so you have 0 = false, 1, 2 & 3 = true. 1:3 ratio which is same as 25%:75%.
|
Great, I think I understand it now.... If 0(false) is picked, it will skip $randombanner1 and go to <else /> $randombanner2. If 3(1,2, or3) is picked, it will stay at $randombanner1. Right?
Thank you very much. Great help!