OK, arrays is my weakness. Say I have an array:
Array ( [0] => 30 [1] => 76 [2] => 46 [3] => 54 [4] => 63 [5] => 73 [6] => 32 [7] => 68 )
And to complicate the matters, I'd like to write the array into a session, so that Idon't have to query db more while the user is on the site. Would it be something like:
$_SESSION['myVars'] = $myArray;
How do I get the random number in this case? My guess is that I need to randomize the KEY as oppose to VALUE of the array... am I getting warmer?
If I have a random number I can get my results like this:
$randomNum = 2;
echo $myArray[$randomNum]; // prints 46