Goto Statement in PHP

Program 1

<html>
    <head><title> go to Statement in PHP Application</title>
    <body>
     <center>
  
<?php

    for($i=1;$i<=10;$i++)
    {
       echo $i;
       if($i==5)
         goto xyz;
       echo "<br>";
    }
    //$a=500;
    // if($a>100)  
    // {
    //     echo "First";
    //     echo "Second";
    //      goto xyz;
    //     echo "Three";
    //     echo "Four";
    // }
     xyz:  echo "end Here"

?>
</center>
</body>
</html>

 

courses

Leave a Reply

Your email address will not be published. Required fields are marked *