The language designers needed to decide to convert mixed variables from
one type to another before the comparison. They chose to convert the
string to a number because that is what many people will want
automatically, remember the data will typically arrive as a string from
the web page and for
Thanks for the vote of confidence, Ross. hah. *shrug*
At any rate, I was wrong about one thing. Mis-remembered something about
converting a string to a int. It doesn't pull all numbers out of the string,
it only pulls leading numbers.
$address = "123 Main St Apt 45";
echo intval($address);
I had a look at the link and couldn't find the quote you have below, but I am
happy to believe you.
Viewed in this context, I guess it does behave correctly and predictably.
I'll have to be more careful with my type mixing in future.
Thanks for your input ... Ross
Paul Menard wrote:
Well per