[PHP] reducing array size

2005-04-16 Thread pete M
Is there an easy way to trim an array ? I'm using array_unshift to push elemnts onto the front of an array but I want to limit the size to 20 ?? Is there an easy way to do this without looping and unsetting the elements ?? tia Pete -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] reducing array size

2005-04-16 Thread Jason Wong
On Saturday 16 April 2005 23:07, pete M wrote: Is there an easy way to trim an array ? I'm using array_unshift to push elemnts onto the front of an array but I want to limit the size to 20 ?? Is there an easy way to do this without looping and unsetting the elements ?? array_slice(),