I have the following array:
Array
Array (
[0] => Array (
...
)
[41] => Array (
[name] => London
[company] => nhyt6t
[top25_1] => 8.75912088
)
[42] => Array (
[name] => Manchester
[company] => gtr4rf
[top25_1] => 6.56758398
)
...
[75] => Array (
[name] => Leeds
[company] => de3wsd6
[top25_1] => 7.58675398
)
)
If my reading and understanding of http://www.php.net/manual/en/function.array-slice.php is correct, then the following should return just those within the array with an index of between 40 and 65.
$array = array_slice($array, 40, 65);
However, in practise, what this does is remove Indexes 0
through 39
but leaves everything else.
Can anyone explained where I am going wrong?