Fw: [PHP] Array Question
| From: | Haseeb Iqbal | Date: | Tue, 15 Apr 2003 03:07:05 +0000 |
| Subject: | Fw: [PHP] Array Question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143768@lists.php.net to get a copy of this message | ||
soo wrong subject
Creativity is inventing, experimenting, growing, taking risks, breaking
rules, making mistakes, and having fun.
Haseeb Iqbal
----- Original Message -----
From: "Haseeb Iqbal" <webcodder@hotmail.com>
To: <php-general@lists.php.net>
Sent: Tuesday, April 15, 2003 8:01 AM
Subject: Re: [PHP] IDE for PHP?
> i don't think so
> try this instead
>
> if (sizeof($arr) >= 2)
> {
> array_shift($arr);
> array_push($arr,$newvalue);
> }
> else
> {
> array_push($arr,$newvalue)
> }
> --
> Creativity is inventing, experimenting, growing, taking risks, breaking
> rules, making mistakes, and having fun.
> Haseeb Iqbal
> "shaun" <shaun@mania.plus.com> wrote in message
> news:20030414134929.98548.qmail@pb1.pair.com...
> > Hi,
> >
> > is it possible to have an array with a maximum value of two so that if a
> add
> > a third value the first one gets removed from the array?
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>