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

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

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