PHP:
$paragraph = $new_page[2][array_rand($new_page[2], $random)];
I'm getting an error with the following code when I try to pull a random number of values from an array (one level deep w/ in another array).
I know I could just pull the sub array out into it's own array and make this easy on myself, but that would be inefficient.
Any idea how to fix my code to work the way I want it to? Oh, if it makes a difference, my array is set up like this:
PHP:
Array
(
[0] => name
[1] => Array
(
[0] => data 1
[1] => data 2
[2] => data 3
)
[2] => Array
(
[0] => other data 1
[1] => other data 2
[2] => other data 3
)
[3] =>
[4] =>
)