Results 1 to 2 of 2

Thread: & and && difference

  1. #1
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default & and && difference

    Stupid question:

    In php what is the difference between

    Code:
    if(getName() & $level){
      return 1;
    }
    Code:
    if(getName() && $level){ // Notice the && here
      return 1;
    }
    Why does it return different answer?
    Thanks
    Last edited by Snookerman; 08-26-2009 at 07:12 AM.

  2. #2
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    NVM Got it! Sorry

Bookmarks

Posting Permissions

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