This function returns numbers that are not equal meaning multiple values that do not equal the same:

Code:
<?php
function randiff($min$max$num) {
    if (
$min<$max && $max-$min+>= $num && $num>0) {
        
$random_nums = array();
        
$i=0;
        while(
$i<$num) {
            
$rand_num rand($min$max);
            if (!
in_array($rand_num$random_nums)) {
                
$random_nums[] = $rand_num;
                
$i++;
            }
        }
        return 
$random_nums;
    } else {
        return 
false;
    }
}
?>
Usage:

Code:
<?php
$nums 
randiff(0,10,2);
$var1 $nums[0];
$var2 $nums[1];
?>
</span>