Jump to content

String comparison


praveenhotha

Recommended Posts

foreach($users as $value)
{
    $key=strcmp($search,$value);
    if($key==0)
    {
        reset($users);
        print("<br>Welcome click to view my pages");
        print("<a href='TestPraveenSession.php'>next page</a>");

    }
}
I am trying to compare 2 strings, using strcmp, so how shud the values be given, it is always giving me false, eventhough i gave the same strings in both the arguments.
Link to comment
https://forums.phpfreaks.com/topic/17810-string-comparison/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.