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(), array_splice()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to