ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to set an interval for shortcode {rand:}

cambium 29 May, 2018
Hello!
Is possible to set an interval for {rand:}? ( i need a number in interval from 0 to 9 only)
If it is, give an example, please.

Thanks
GreyHead 29 May, 2018
1 Likes
Hi s.elena133,

I don't think that there is any way to set that for {rand;} - you could trim the result down to just the first digit. But probably simpler to use a PHP action with the rand() method - see here.

Bob
cambium 29 May, 2018
Hi Bob,
I thought about the trim method, but if it would be the number for 1..20, for example, then be needed the interval.
It's a pity that there is no such possibility with {rand:}. It would be very convenient
In some cases php more useful of course.

Many many thanks
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com