Jump to content

[SOLVED] Goto


waz

Recommended Posts

what my logic is simple i need to do a path check with a path variable which changes location every time its not found  with a maxium of 3 paths now if i dont find it i need to skip some code under neath now i am aware people generally flame gotos and yes it is frowned upon however in some casses they are acceptable and i need to break out of loop and this is easiest way to write it.

 

 

Link to comment
https://forums.phpfreaks.com/topic/55065-solved-goto/#findComment-272216
Share on other sites

Firstly i suggest you use a bit of punctuation while you post, especially if you talk about logic which is hard to get...

 

Now secondly there are many ways to implement any logic with php

Using switch,if ... then ... else..., looping, functions .

 

now if i have understood correctly from your post since you only want to check one variable i suggest you use the switch statement which faster than multiple if...then...else .

Link to comment
https://forums.phpfreaks.com/topic/55065-solved-goto/#findComment-272221
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.