Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.