try:
<?php
return rand($begin,$end);
-
☆ A M B ☆
- 756 Posts
If you create a snippet with that name RandomNumber and those two parameters the code would look like:
<?php
if((isset($begin) && isset($end)) && $end >= $begin){
return rand($begin, $end);
}
return 0; // Return zero for false could return something else if desired
Just copy past that into the snippet and also make sure you call the snippet uncached:
[[!RandomNumber?&begin=`12` &end=`24`]]
Cheers
Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
Visit
CharlesMx.com for latest news and status updates.