Re: How to reduce an array to n values?
| From: | [-^-!-%- | Date: | Sun, 24 Mar 2002 19:54:23 +0000 |
| Subject: | Re: How to reduce an array to n values? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89923@lists.php.net to get a copy of this message | ||
Use array_pop.
See the manual.
-j
__________John Monfort_________________
_+-----------------------------------+_
P E P I E D E S I G N S
www.pepiedesigns.com
-+___________________________________+-
On Sun, 24 Mar 2002, Andy wrote:
> Hi there,
>
> I am trying to reduce an array to n values if it is more than n values.
>
> eg.
>
> $level_depth = 3;
> $test = array('banana', 'super', 'php', 'car');
>
> # some array function which is deleting the last item ( car) if existant
>
> Thanx for any help,
>
> Andy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>