glenelkins Posted November 16, 2006 Share Posted November 16, 2006 HiIf for example we had a loop[code]for ($i=0;$i<10;$i++) { if (condition is false) { break; }}[/code]Is there a way to make this code Break to a label/tag in the code? Quote Link to comment Share on other sites More sharing options...
printf Posted November 16, 2006 Share Posted November 16, 2006 I don't understand what you mean by [b]label/tag[/b], please explain it in more detail. As for jumping to some other place in the script like [b]evil[/b] GOTO, it's not going to happen until PHP 6, even then it will be limited, because using GOTO, equates to bad coding logic, no matter how useful you think it might be.Dennis Ritchie[b]goto[/b] is usually used as an advanced tool, but is never needed in well designed algorithms. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.