Re: Some strings are not true ?
- From: groups2@xxxxxxxxxx
- Date: Mon, 31 Dec 2007 12:55:38 -0800 (PST)
On Dec 31, 2:40 pm, Justin Koivisto <justin.koivi...@xxxxxxxxx> wrote:
grou...@xxxxxxxxxx wrote:
This is true: "2-3"==1
But "1-2"==1 is not true
Why ?
<?php
var_dump("2-3"==1);
var_dump("1-2"==1);
?>
Output:
bool(false)
bool(true)
Why? "2-3" evaluates to 2, "1-2" evaluates to 1. 2!=1 therefore the
first statement is false, the second one is true because 1==1
--
Posted via a free Usenet account fromhttp://www.teranews.com
OK, thanks, it makes sense now.
.
- References:
- Some strings are not true ?
- From: groups2
- Re: Some strings are not true ?
- From: Justin Koivisto
- Some strings are not true ?
- Prev by Date: Re: strpos - and multiple needles?
- Next by Date: Re: creating a cumulative total column, but not in sequence
- Previous by thread: Re: Some strings are not true ?
- Next by thread: Re: Some strings are not true ?
- Index(es):