This is nothing new but looks confusing.  Open phpif.php and save it as phpifnested.php.  Although this page works it causes the server to examine the same things many times.  Of the six if statements keep the first three and delete the rest.  You should now have ==, < and  >. 

It is not possible that more than one can be true (e.g. if the values are the same the first one cannot also be less than the second).  This means that you do not need to do the second check if the first is true.  Change your code by adding an else with it's two braces on the end of the first if.  You now have an if/else followed by two more if statements.  Move the first remaining if statement into the else (inside the braces).  Now that if will only be checked if the condition in the if/else is false.  If you grasp that the rest is the same:

  1. add an else onto the if statement that is now inside the first else
  2. move the final if statement into that new else

When finished and properly indented your code will follow this pattern:

if(condition) {

    echo

} else {

    if (condition) {

        echo

    } else {

        if (condition) {

            echo

        }

    }

}

If you understood that well done!  If you really understood it you will have spotted a flaw but for now try to understand the principle:

if the numbers are the same

    say so

if not do the next check

    if the first number is smaller

        say so

else

....and so on....

This saves processing time and so speeds up the server.  All those braces can get confusing though.  Test your code with different numbers (where the first is the same as, less than and then greater than the second).

The final step

For those who didn't spot the small problem here it is.  There are three checks being made with the next one only being made if the previous one was false.  So to get to the final check the two numbers would have to be:

  1. not equal
  2. the first is not smaller

Therefore the second must be bigger.  There is no point in having the final if because it will always be true if the server ever gets that far.  So to further speed up your script change that final if statement by deleting the first and third lines and just keeping the echo line.  So your code has gone from three if statements to just two (and the second one will not run some of the time when the first is true).  Proper programming uses lots of nested if statements and other nested constructs.

Logic

If you find that sort of logical, structured thinking easy then you may well be a natural programmer if such a thing exists.  The rest of us will just have to get headaches.