PHP Syntax Statements Jumping goto

 

- Info:

- goto statement is used to jump unconditionaly to a specified part of code defined by a lable.

 

- Syntax:

goto label;

...

label:

code

 

- Example:

- Create PHP Console Application Test.php.

 

Test.php

<?php

 

goto jump1;

print("Skip this.");

jump1:

print("Hello.");

 

?>