Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-11 Thread Tijnema
On 8/10/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 08. 10, péntek keltezéssel 02.31-kor Jan Reiter ezt írta: Hi! Thank you for your response! The only intention of my code was to investigate the (back then) unexpected behavior of the if statement. With $var['test'] set to

RE: [PHP] I know this is not easy and I'm not stupid but...

2007-08-10 Thread Zoltán Németh
2007. 08. 10, péntek keltezéssel 02.31-kor Jan Reiter ezt írta: Hi! Thank you for your response! The only intention of my code was to investigate the (back then) unexpected behavior of the if statement. With $var['test'] set to blah this expression should be false ($var['test'] ==

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-10 Thread Richard Lynch
On Thu, August 9, 2007 1:24 am, Phil Curry wrote: $userValues = ' 1'; line 102 echo ($userValues['afterDark']); // outputs 1 line 103 if ( $userValues['afterDark'] == 0 ) {// passes When using echo to display debug output ALWAYS surround the data with some kind

[PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Phil Curry
how can this be? This is not the first time I've run into a situation like this. What am I missing? line 102echo ($userValues['afterDark']); // outputs 1 line 103if ( $userValues['afterDark'] == 0 ) {// passes Thanks. -Phil -- PHP General Mailing List

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Stut
Phil Curry wrote: how can this be? This is not the first time I've run into a situation like this. What am I missing? line 102echo ($userValues['afterDark']); // outputs 1 line 103if ( $userValues['afterDark'] == 0 ) {// passes Add a line at 102.5...

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Stut
Please include the list when replying. Phil Curry wrote: Phil Curry wrote: how can this be? This is not the first time I've run into a situation like this. What am I missing? line 102echo ($userValues['afterDark']); // outputs 1 line 103if ( $userValues['afterDark'] == 0

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Jim Lucas
Stut wrote: Please include the list when replying. Phil Curry wrote: Phil Curry wrote: how can this be? This is not the first time I've run into a situation like this. What am I missing? line 102echo ($userValues['afterDark']); // outputs 1 line 103if (

RE: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Jan Reiter
Hi! Phil: Still I am curious what var_dump($userValues['afterDark']); at line 102.5 would return. I managed to recreate that fault with $var['test'] = blah; echo ($var['test']); if( $var['test'] == 0) { echo ok; } //this returns blahok -- not expected. In my case Var_dump()

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Jim Lucas
Jan Reiter wrote: Hi! Phil: Still I am curious what var_dump($userValues['afterDark']); at line 102.5 would return. I managed to recreate that fault with $var['test'] = blah; echo ($var['test']); if( $var['test'] == 0) { echo ok; } //this returns blahok -- not expected. In my

Re: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Phil Curry
Please include the list when replying. Phil Curry wrote: Phil Curry wrote: how can this be? This is not the first time I've run into a situation like this. What am I missing? line 102echo ($userValues['afterDark']); // outputs 1 line 103if ( $userValues['afterDark'] ==

RE: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Jan Reiter
Hi! Thank you for your response! The only intention of my code was to investigate the (back then) unexpected behavior of the if statement. With $var['test'] set to blah this expression should be false ($var['test'] == 0) for what I know ... $var['test'] = blah; var_dump($var['test'] == 0);

RE: [PHP] I know this is not easy and I'm not stupid but...

2007-08-09 Thread Jan Reiter
Ummh, no! (int) and (integer) perform a C style atoi() conversion. (int)blah = integer 0 (int) = integer 0 (int)1= integer 1 (int)12 = integer 12 (1 == 0) = false (blah == 0) = true ( (int)$userValues['afterDark'] === 0 ) only is true, if $userValues['afterDark'] is a