i have a simple array with 100 elements, but i need to use only the last 99 elements( without element )
how can I do without iterating through the array from 1 to 100, using a for? do you have any smarter solution?
$in = array(1,2,3,4, ..., 100);
$out = array_shift($in);
for ($i = 0; $i < count($out); $i++)
MANY THX.....this is really a smart thing
Even simpler, you could use array_slice() to take a copy of the part of the array you want, and iterate through that: