phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Calendar planer problem (0.9.14)


From: Mark A Peters (Skeeter)
Subject: Re: [Phpgroupware-developers] Calendar planer problem (0.9.14)
Date: Tue, 16 Jul 2002 19:15:41 -0400 (EDT)

The alternative code wouldn't work to well, as the foreach is php4
specific and does not conform to our agreement with GNU/FSF.  phpGW code
should be php3 compatible.  And to let you know, I think there already is
a reset($daily) statement just a few lines above that.

I had made those changes last night and commited to CVS.

Thanks,
Mark A Peters (Skeeter)

On Tue, 16 Jul 2002, Scott Courtney wrote:

> On Monday 15 July 2002 07:32 pm, Sam Przyswa wrote:
> > >       while (list($nul,$event) = @each($daily))
> 
> As a general rule, wouldn't it be wise to put a reset($daily) line ahead of
> this while() loop, just in case the array pointer happens to be not at the
> start of the array when arriving at this code section? I generally do this
> even if I "think" it will always be at the start of the array -- just to be
> on the safe side. This has bitten me once or twice in the past. :-)
> 
> Alternative code:
> 
>      foreach ($daily as $event) {
> 
> The foreach() loop performs an implicit reset(), according to the online PHP
> documentation.
> 
> Scott
> 
> -- 
> -----------------------+------------------------------------------------------
> Scott Courtney         | "I don't mind Microsoft making money. I mind them
> address@hidden       | having a bad operating system."    -- Linus Torvalds
> http://4th.com/        | ("The Rebel Code," NY Times, 21 February 1999)
>                        | PGP Public Key at http://4th.com/keys/courtney.pubkey
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]