Php - Php goto operator jump statement, How to use goto operator in php
Php goto operator jump statement
Features of php GOTO operator1) The goto operator can be used to jump to another location in a program.
2) The instruction is like goto followed by any label name.
3) The target location is specified by the label name followed by a colon.
4) The target label must be within the same file and context.
5) Cannot jump out of a function or method and jump into loop or switch.
<?php for($i=0; $i<100; $i++) { if($i==17) goto end; } echo \"Not here at end\"; end: echo \'GO where I say\'; ?>Ouput:
GO where I say
The topic on Php - Php goto operator jump statement is posted by - Math
Hope you have enjoyed, Php - Php goto operator jump statementThanks for your time