Hello, I am having multidimensional array like,
$arr[0]['key']
And after this it contains index array. I want to slice this array into the bunch of 15 values. How can I do it? Please help me.Tthanks in advance.
What do you mean by "after this it contains index array"? A concrete example may help.
Thanks for the reply. Here is my array.
$arr[0]['key'][0]='value1'; $arr[0]['key'][1]='value2'; $arr[0]['key'][2]='value3';
And I want to slice it.
What would the result of the slicing look like?
Thanks for the reply again. I need all the values should be sliced in the bunch of 15 values.
Not sure if I understand what you mean, but if I do: [man]array_splice[/man]
$parts = array(); while (count($arr)) { $parts[] = array_splice(); }
computerzworld wrote:I need all the values should be sliced in the bunch of 15 values.
I need all the values should be sliced in the bunch of 15 values.
Different people may have different ideas on what "slicing" an array means here. By "looks like", I am looking for a concrete example related to your example input array in post #3.