473,238 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

goto line command

Help me plz..
i'm new with this stuff
i want to know what is php command for goto other line
for example i want to go to line 50 and skip the previous
can anyone help me :p
Sep 1 '05 #1
3 13753
2,460 Expert Mod 2GB
I don't think there is an goto line command for php.

Through a while, do-while or switch statement you can use the break function. You will have to redesign your code a little to use it.

more information here
Sep 1 '05 #2
thanks for the quick replay
that's usefull...... :D
Sep 1 '05 #3
5,821 Expert 4TB
Goto is coming, but with some restrictions.

In PHP 6, you'll be able to create a static label and then use a break statement to jump to it:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. for ($i = 0; $i < 9; ++$i)
  3. {
  4.         if (true) {
  5.                 break blah;
  6.         }
  7.         echo "not shown";
  8. blah:
  9.         echo "iteration $i\n";
  10. }
  11. ?>
As a general rule, just like the traditional break, you can jump *out* of loop constructs, but you cannot jump *into* them. It is unclear for the moment whether this functionality will be available outside of a loop, but given that this is an expansion of the break keyword, I would tend to assume that this functionality would only be available inside of a loop (I wonder about switches, though....).

For more information, see this page.
Sep 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: BOOGIEMAN | last post by:
I've just finished reading Python turtorial for non-programmers and I haven't found there anything about some usefull commands I used in QBasic. First of all, what's Python command equivalent to...
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
by: Aaron | last post by:
I have a multi-line text box and a button. the textbox displays a large text file about 1000line I want the textbox to goto say line 324 (line 324 is now the first line in the textbox) when the...
by: M.B | last post by:
Guys, Need some of your opinion on an oft beaten track We have an option of using "goto" in C language, but most testbooks (even K&R) advice against use of it. My personal experience was that...
by: electrician | last post by:
Perl has it, Basic has it, Fortran has it. What is so difficult about creating a goto command for JavaScript. Just set up a label and say go to it.
by: MayBoy | last post by:
Hi There I am trying to use the Goto method of the Word ActiveX object. I am trying to open a document and go to a named bookmark. If I use this code in VB it works, so I'm sure the approach is...
by: faizankhan666 | last post by:
I have been given a project to prepare a program for cricket scoreboard...now when all the 10 wickets fall I want my program to go to the end..lets say on line 50. what is the syntax of goto...
by: iapx86 | last post by:
My parser project calls for a computed goto (see code below). The C preprocessor delivers the desired result, but is ugly. Template metaprogramming delivers results I do not understand. Can...
by: =?Utf-8?B?Um9nZXIgVHJhbmNoZXo=?= | last post by:
Hello, I have a question about the infamous GOTO statement and the way to return a result from a sub: I have a sub that has to make some calls to external COM methods, and because these...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.