How to define a variable with random values in Smarty

Posted by hydrarulz on Stack Overflow See other posts from Stack Overflow or by hydrarulz
Published on 2010-03-23T17:00:55Z Indexed on 2010/03/23 17:03 UTC
Read the original article Hit count: 254

Filed under:
|

I need to assign a variable which will be used to create the id label for some html elements.

And it needs to be unique.

I tried

{assign var=unique_id value=`10|mt_rand:20`}

and

{math equation='rand(10,100)'}

But I don't know how to use the result

I don't have any other ideas

© Stack Overflow or respective owner

Related posts about smarty

Related posts about html