RE: [PHP] IF statement madness

2003-03-14 Thread James E Hicks III
Thank you (all who resonded)!!! It makes sense now. Now I can wait until 5:00pm, quitting time, to go crazy!! James -Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 1:23 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] IF statement madness

RE: [PHP] IF statement madness

2003-03-14 Thread Ford, Mike [LSS]
> -Original Message- > From: James E Hicks III [mailto:[EMAIL PROTECTED] > Sent: 14 March 2003 18:22 > > Help save my sanity! What can I do to the IF statement in the > following code to > make it print the line that says "By God they are equal in > value."? I have tried > the following

RE: [PHP] IF statement madness

2003-03-14 Thread jon roig
What happens if you change $target to 216.0? -- jon -Original Message- From: James E Hicks III [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 1:22 PM To: [EMAIL PROTECTED] Subject: [PHP] IF statement madness Help save my sanity! What can I do to the IF statement in the f

Re: [PHP] IF statement madness

2003-03-14 Thread Ernest E Vogelsinger
At 19:21 14.03.2003, James E Hicks III said: [snip] >Help save my sanity! What can I do to the IF statement in the following >code to >make it print the line that says "By God they are equal in value."? I have >tried >the following changes; > > 1. usin

RE: [PHP] IF statement madness

2003-03-14 Thread Johnson, Kirk
Comparing a float with an integer can have problems. You could try something like: if(abs($i - $target) < .1) { //then they are essentially equal } Kirk > -Original Message- > From: James E Hicks III [mailto:[EMAIL PROTECTED] > Sent: Friday, March 14, 2003 11:22 AM > To: [EMAIL PRO