Blog Introductions

In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. Php controls flow if-else  statements  |  Php tutorials Bestitworriors


Php controls flow if-else  statements 



Php controls flow if-else  statements




Php controls flow if-else  statements  |  Php tutorials Bestitworriors - Php controls flow used to execute code on specific condation . Execute code on when that condation match with certein criteria.This piece of code is use to execute if certain given condation is matches.if(contation ==condation) // Execute certain pice of code.The if-else control flow of code with respect to condation if a first condation is don't match the it will execute the else{//code} part . You can use multiple if-else controls in regular flow . One more condation can be use is else-if .


Some Key Points of if-else

    1. Php if-else use to control the code
    2. if-else use in if some condational code occure
    3. if a first condation don't match code execute the else part
    4. You can use else-if condation too
    5. You can have multiputle if-else or else-if in your code
    6. Mostely use to control the flow in order to certein condation

    Code


    <?php


    $value1=10;
    $value2=20;

    if ($value1<$value2) {

    echo "First variabel is smaller then Second";
    echo "<br>";
    }



    if ($value1>$value2) {

    echo "First variable is greater the second";
    echo "<br>";

    }
    else {

    echo "First variable is smallar then second";
    echo "<br>";
    }


    if ($value1==$value2) {

    echo "Both variables are equal";
    echo "<br>";
    } elseif ($value1 < $value2) {

    echo "First Variable is smallar the Second";
    echo "<br>";

    } else {

    echo "First Variable is Greater then Second";
    echo "<br>";

    }







    ?>


    OutPut


    First variabel is smaller then Second
    First variable is smallar then second
    First Variable is smallar the Second




    I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about Php controls flow if-else  statements  |  Php tutorials Bestitworriors