Jump to content

MrHellism

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by MrHellism

  1. Hey friends, I just started learning php. I want to know the difference between == and === I exactly want to know the comment section of the given code below. Thanks. <?php $mystring = 'abc'; $findme = 'a'; $pos = strpos($mystring, $findme); // The !== operator can also be used. Using != would not work as expected // because the position of 'a' is 0. The statement (0 != false) evaluates // to false. if ($pos !== false) { echo "The string '$findme' was found in the string '$mystring'"; echo " and exists at position $pos"; } else { echo "The string '$findme' was not found in the string '$mystring'"; } ?>
×
×
  • 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.