comments inline

Choy, Wai Yew wrote:
<?php
$a = 1;

            $id = "outside";

this if statement is false, because $a == 1
if ($a == 0) {
                        $b = 1;

                        $id = "a";

            }

this if statement is true, because $b has not been defined, and is evaluating to 0
            elseif ($b == 0) {

                        $c = 1;

$id = "b";

            }

this statement never gets reached, because the previous statement was true
            elseif ($c == 0){

                        $d = 1;

                        $id = "c";

            }

 echo "ID = $id<br>"; //Output is "b"...WHY?? It should be "outside"...

?>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to