Re: [PHP] Wanting to better understand

2002-10-01 Thread Chris Shiflett
Paul Nicholson wrote: >If ($days > 30) { >$days = "" . $days . ""; >}elseif ($days > 45) { >$days = "" . $days . ""; >} > Just a side note - the elseif when used like this is superfluous. If $days is not greater than 30, then it must be 30 or less. Thus, it will never be greater than 4

Re: [PHP] Wanting to better understand

2002-10-01 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 oppsI need those reversed. - switch (TRUE) { case ($days > 45): $days = "" . $days . ""; break; case ($days > 30): $days = "" . $days . ""; break; } - If ($days > 45) { $days = "" . $days . ""; }

Re: [PHP] Wanting to better understand

2002-10-01 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yeah, I know...duh! *yawn* long nite...I'll see y'all in the morn. :) ~Paul On Tuesday 01 October 2002 11:22 pm, Chris Shiflett wrote: > Paul Nicholson wrote: > >If ($days > 30) { > >$days = "" . $days . ""; > >}elseif ($days > 45) { > >$days

Re: [PHP] Wanting to better understand

2002-10-01 Thread Sascha Cunz
Anyway... cool way to use switch Obviously i've been working too much with C, that i never thought of a way, you could use the conditional-expression in the "case", not in the switch ;) Sascha > switch (TRUE) { > case ($days > 45): > $days = "" . $days . > ""; break; case

Re: [PHP] Wanting to better understand

2002-10-01 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, ok, I'm not sure if I totally understand what you're trying to do but.I'll give it my best. Try: switch (TRUE) { case ($days > 30): $days = "" . $days . ""; break; case ($days > 45): $days = ""

Re: [PHP] Wanting to better understand

2002-10-01 Thread Chuck PUP Payne
A, ok. You know am still having problems with elseif, else, Ok, thanks I will give it a try. Chuck On 10/1/02 11:03 PM, "Chris Shiflett" <[EMAIL PROTECTED]> wrote: > Chuck, > > I'm not sure what you're trying to do, but I think you might just want > to order it the other way around. > >

RE: [PHP] Wanting to better understand

2002-10-01 Thread Jarrad Kabral
and just when I thought this day couldnt get any more confusing:| -Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 2 October 2002 12:50 PM To: PHP General Subject: [PHP] Wanting to better understand Hey, I am trying to better understand s

Re: [PHP] Wanting to better understand

2002-10-01 Thread Chris Shiflett
Chuck, I'm not sure what you're trying to do, but I think you might just want to order it the other way around. if ($days > "45") { # $days is 46 or more do stuff } elseif ($days > "30") { # $days is 31-45 do other stuff; } else { # $days is 30 or less more stuff;