Re: PHP Newbie Q, seperating even from odd in an array
| From: | val petruchek | Date: | Mon, 11 Feb 2002 18:13:27 +0000 |
| Subject: | Re: PHP Newbie Q, seperating even from odd in an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84303@lists.php.net to get a copy of this message | ||
if ($a % 2) {$a is odd here}
ELSE ($a is even)
Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:val@zliypes.com.ua
----- Original Message -----
From: "Chris Skinner" <chris.skinner@wcom.com>
To: <php-general@lists.php.net>
Sent: Monday, February 11, 2002 7:55 PM
Subject: [PHP] PHP Newbie Q, seperating even from odd in an array
> Hi all,
>
> I am reading into an array from a text file, and when referencing, I would
> like to reference the even and odd counts of the array seperately. I am
> trying to split them up into two columns to more easily manage a list.
>
> Is there a call that allows -- > if $n = even {
>
> Thanks!
>
> --Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>