!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robin

    !

    what's ! do?

    --
    peace,
    Robin
    --------------
    robin@csf.edu
    Please CC a copy of your message to me.
    --------------



  • Dan Tripp

    #2
    Re: !

    Robin wrote:[color=blue]
    > what's ! do?
    >
    > --
    > peace,
    > Robin
    > --------------
    > robin@csf.edu
    > Please CC a copy of your message to me.
    > --------------
    >
    >
    >[/color]

    ! is the logical NOT operator.



    Regards,

    - Dan

    Comment

    • Cecile Muller

      #3
      Re: !

      > what's ! do?

      It returns the contrary of the boolean expression.
      For example:

      <?php
      $i_should_say_h ello = true;
      if (!$i_should_say _hello) echo "Hello world"; else "Good bye world";
      ?>

      This will print "Good bye world" because ! means that if
      $i_should_say_h ello is *not* true, it should print "hello world".

      Comment

      • CountScubula

        #4
        Re: !

        It stand for NOT as in NOT equal !=

        NOT TRUE !(true)

        --
        Mike Bradley
        http://www.gzentools.com -- free online php tools
        "Cecile Muller" <spam@wildpeaks .com> wrote in message
        news:aff31ac6.0 401120325.4274f 1c9@posting.goo gle.com...[color=blue][color=green]
        > > what's ! do?[/color]
        >
        > It returns the contrary of the boolean expression.
        > For example:
        >
        > <?php
        > $i_should_say_h ello = true;
        > if (!$i_should_say _hello) echo "Hello world"; else "Good bye world";
        > ?>
        >
        > This will print "Good bye world" because ! means that if
        > $i_should_say_h ello is *not* true, it should print "hello world".[/color]


        Comment

        Working...