Create Unique Random Number

how to generate unique random number between 1 to 30 I used rand(1,30) but It will return redundant random number but I want unique result only. how to achieve this help me I need urgently…

so that will get only 30 unique numbers only right…

yes. 30 unique numbers…

is this generated number is stored id db??

no but I want to store the previously generated random number to be stored in session… suggest ur ideas with code snippet pls

then store the generated numbers in a session as an array,

if a new number is generated check in the session array is it present, if yes another is generated.u…

in_array — Checks if a value exists in an array

This may help you…

ya I tried this already but I miss that snippet

Please post your code here…we can solve it.

thanks Balu I got it through using Chtml::radioButton( )