note 90904 added to function.strcmp
| From: | arnar at hm dot is | Date: | Fri, 15 May 2009 14:51:06 +0000 |
| Subject: | note 90904 added to function.strcmp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154639@lists.php.net to get a copy of this message | ||
Sometimes when you compare two strings that look "the same", you will find that they
aren't. If you don't want to bother finding out why, then this is a simple solution:
$string = implode(str_split($string));
Converting the strings to md5 is also a nice method to see if they're equal.
md5($str1)."\n";
md5($str2)."\n\n";
____________
Arnar Yngvason
ThinkSoftware
----
Server IP: 213.181.100.226
Probable Submitter: 193.4.157.113
----
Manual Page -- http://www.php.net/manual/en/function.strcmp.php
Edit -- https://master.php.net/note/edit/90904
Del: integrated -- https://master.php.net/note/delete/90904/integrated
Del: useless -- https://master.php.net/note/delete/90904/useless
Del: bad code -- https://master.php.net/note/delete/90904/bad+code
Del: spam -- https://master.php.net/note/delete/90904/spam
Del: non-english -- https://master.php.net/note/delete/90904/non-english
Del: in docs -- https://master.php.net/note/delete/90904/in+docs
Del: other reasons-- https://master.php.net/note/delete/90904
Reject -- https://master.php.net/note/reject/90904
Search -- https://master.php.net/manage/user-notes.php