How to reduce an array to n values?
| From: | Andy | Date: | Sun, 24 Mar 2002 12:30:47 +0000 |
| Subject: | How to reduce an array to n values? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89906@lists.php.net to get a copy of this message | ||
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