Re: Some strings are not true ?



groups2@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 from http://www.teranews.com

.