Jump to content

Statements


shane18

Recommended Posts

@>IF STATEMENT<@

 

    if($A)

 

    if(!$A)

 

    if($A == $B)

 

    if($A != $B)

 

    if($A >= $B)

 

    if($A <= $B)

 

    if($A > $B)

 

    if($A < $B)

 

    if($A === $B)

 

    if($A !== $B)

 

    if($A && $B)

 

    if($A || $B)

 

    if($A == $B && $C)

 

    if($A == $B && $C == $D)

 

    if($A == $B || $C == $D)

 

    if($A && $B == $C && $D > 1)

 

    EXAMPLE

 

    if($LAST_ACTIVITY >= time() + 3600){

    echo "ONLINE";

    }else{

    echo "OFFLINE";

    }

 

@>WHILE LOOP<@

 

    while($A > 2)

 

    while($A < 2)

 

    while($A >= 2)

 

    while($A <= 2)

 

    while($ROW = $RESULT->fetch_object())

 

    EXAMPLE

 

    while($BUDDY = $BUDDIES->fetch_object()){

    echo "$BUDDY<BR>";

    }

 

Are all these ways correct syntax?

Link to comment
https://forums.phpfreaks.com/topic/191277-statements/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.