Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    PHP logical tags and comparing symbols


    House
     Share

    Recommended Posts

    Hi there,

     

    I am going to show you a few "logical symbols" of programming languages.

    First of all,

    when you are coding something, and want to check or compare, there's no way around logical tags!

     

    If you would like to check if something matches the other thing exaclty, then use:

    ==

    in for example:

    if($variable1 == $variable2)

     

     

    If you would like to set a variable, then you will need to just simply use:

    =

    This sets something to some other thing.

     

     

    If you would like to check if something is not another thing, then use:

    !=

    for example:

    if($variable1 != $variable2)

     

     

    If you would like to check if something is greater or smaller than something else:

    >

    <

     

    if you would like to check if something is something OR something else, use:

    ||

    between the two comparison items.

    if($variable1 == 1 || $variable1 == 2)

     

     

    if you would like to check if something is something AND something:

    &&

    for example:

    if($variable1 == 1 && $variable1 == 2)

     

     

     

    That was it for now, if you know something else, post it in here pls xD

    Link to comment
    Share on other sites

    • 1 month later...

    To Add:

     

    If you want to check whether a variable is lower or the same like something, you make it like this :

     

    if ($a >= $b) { }...
    Link to comment
    Share on other sites

    • 2 months later...

    You also have ===

    === means they are equal, and same type

    example:

     

    if (0 == false) {} // this is true. 0 == false. Different type (int vs. bool) but its == so type don't matter
    
    if (0 === false) {} // This is not true. It is the same, but not the same type (int vs. bool).
    
    if (1 == "1") {} // I believe this is true.
    
    if (1 === "1") {} // This is defenetly NOT true.

    Edited by MinIGod
    Link to comment
    Share on other sites

    tip :

    int = whole numbers like 1,2,3 and stuff.

    bool = true and false

    without string formatting ( "TRUE" )

    Link to comment
    Share on other sites

    • 4 months later...

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Loading...
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...