Re: Array help
| From: | David Robley | Date: | Thu, 15 Mar 2001 01:38:12 +0000 |
| Subject: | Re: Array help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43943@lists.php.net to get a copy of this message | ||
On Thu, 15 Mar 2001 10:56, Chris wrote:
> > Hi,
> Is there a way to do an array_pop with php3?
Off the top of my head:
use count to get the number of elements in the array
grab element(count - 1) as the popped value
Then (maybe)
unset(element[count-1])
may work; if not you might have to play around with assigning all the
elements bar the last of your original array to a new array.
--
Please don't hit Reply to respond - use this address instead:
huntsman@www.nisu.flinders.edu.au
Local SMTP server is creatively munging domains!!!
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA