Page 1 of 1

Unset Array Items

Posted: Sun Dec 02, 2007 12:35 pm
by thiscatis
Hi guys!

Well I'm having some coding problems here.

I can unset a specific array item using

Code: Select all

unset ($files['0']);
But is there a way to unset specific files for e.g. unset all items from the array except the first 20 items.
With 20 being a variable.


Thanks!

Posted: Sun Dec 02, 2007 1:06 pm
by feyd
array_slice() may be of interest.