Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    laredo
    Posts
    303

    comparision operator

    After looking into the code for several minutes and not being able to make something work. I separated the code by itself to find out what I am doing worng. I was surprised to find out that this doesn't work. Can anyone tell me why I get a "not equal" result.

    <?php
    $qnum == "Answ[30]";

    if ($qnum == "Answ[30]"){
    echo "qual";
    }
    else
    {
    echo "not equal";
    }

    ?>

  2. #2
    Join Date
    Jul 2003
    Location
    laredo
    Posts
    303
    Nevermind. I found it after I posted this. It should be

    $qnum2 = "Answ30";

    instead of

    $qnum2 == "Answ30";


    I need a break.

    Administrator please delete this post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •