Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17640
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: filter function for odd and even in a for loop |
| Date | 2018-01-05 02:07 +0100 |
| Message-ID | <fb81euFpc8eU1@mid.individual.net> (permalink) |
| References | <3a933c1c-9f1e-49a5-9792-1dff43669940@googlegroups.com> |
jans:
> The two included filter functions work from php manual. What I want
> them to do is if it is even print the number. If it is odd print
> "odd"; I am not getting a result in the for loop?[...]
> for ($i=0; $i<= sizeof($arr); $i++){
> if ($arr_filter($arr,'even')==1){
> print_r($arr=>$i);
> }elseif($arr_filter($arr,'odd')==1)
> {
> print_r('odd');
> }
> }
What is this? This code makes no sense at all.
Turn on error reporting and see for yourself.
--
Arno Welzel
https://arnowelzel.de
https://de-rec-fahrrad.de
http://fahrradzukunft.de
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
filter function for odd and even in a for loop jans <janis.rough@gmail.com> - 2018-01-04 14:45 -0800
Re: filter function for odd and even in a for loop Jerry Stuckle <jstucklex@attglobal.net> - 2018-01-04 20:01 -0500
Re: filter function for odd and even in a for loop inigojoseph89@gmail.com - 2018-01-23 02:05 -0800
Re: filter function for odd and even in a for loop Jerry Stuckle <jstucklex@attglobal.net> - 2018-01-23 07:51 -0500
Re: filter function for odd and even in a for loop Arno Welzel <usenet@arnowelzel.de> - 2018-01-05 02:07 +0100
Re: filter function for odd and even in a for loop Mark Lloyd <not@mail.invalid> - 2018-01-05 14:11 -0600
Re: filter function for odd and even in a for loop "J.O. Aho" <user@example.net> - 2018-01-05 21:52 +0100
csiph-web