Array Rand
Posted: Tue Nov 04, 2008 10:38 am
http://ca.php.net/array_rand
When using array_rand, I am getting no values at all.
The array ($story) returns an array of 7 elements, when not passed through array_rand
I want to get 4 of the 7 elements randomly.
$story = function($getThese, 7)
$story = array_rand($story ,4);
When using array_rand, my var_dump shows this:
array(4) { [0]=> int(1) [1]=> int(4) [2]=> int(2) [3]=> int(3) }
I am using a multi-dimensional array.
When using array_rand, I am getting no values at all.
The array ($story) returns an array of 7 elements, when not passed through array_rand
I want to get 4 of the 7 elements randomly.
$story = function($getThese, 7)
$story = array_rand($story ,4);
When using array_rand, my var_dump shows this:
array(4) { [0]=> int(1) [1]=> int(4) [2]=> int(2) [3]=> int(3) }
I am using a multi-dimensional array.