I'm sure this has probably been covered here in the past, but I've
been unable to find a good way to search for it, so I'll just ask.
if( '2011020402421730' === '20110204024217300264' )
echo 'BAD';
else
echo 'GOOD';
results in GOOD being echoed.
However,
if( '2011020402421730' ==
On Fri, Apr 22, 2011 at 10:27:33AM -0400, Matt Pelmear wrote:
My questions are:
1) What is the advantage to converting both strings to ints to compare them?
It makes things easy for working on what comes back from a form (in $_POST/...).
It is a nice feature, and works well *most* of the time.
or strcmp()
yeah, strcmp is your friend there.
Brian.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php