Jump to content

jphillips67

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by jphillips67

  1. Thanks did not know this. Will make this part of my plan moving forward.
  2. This has got me really confused, when did setting a variable = 0 make everything true in an if then statement (except for numbers) or has this always been the case and I just never ran across it. Is there a possible setting in php? The code below should not echo Hello world but it does. <?php $test = 0; if ($test == "Y") { echo "Hello world"; } ?> This code will echo Hello World and I do not believe it should either.... <?php $test = 0; if ($test == "TEST") { echo "Hello world"; } ?> Comment out the var $test and the code work as expected does not echo out Hello World //$test = 0; if ($test == "TEST") { echo "Hello world"; } ?> Set var = "0" and it works as expected does not echo out Hello World <?php $test = "0"; if ($test == "1") { echo "Hello world"; } ?>
×
×
  • 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.