PHP – goto statement

The goto statement plays an important role in PHP if we want to take control to another section of the program.

The goto statement in PHP

In the goto statement, the target location is specified using  a label followed by a colon, and the control is specified as goto followed by the desired target label.

You can understand the goto statement using the following example:

 

Leave a Reply

Your email address will not be published.