473,407 Members | 2,315 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,407 software developers and data experts.

goto line command

3
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 13790
Niheel
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
http://us3.php.net/manual/en/control...ures.break.php
Sep 1 '05 #2
Banx
3
Hi..KUB365
thanks for the quick replay
that's usefull...... :D
Sep 1 '05 #3
pbmods
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

25
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...
51
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...
1
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...
77
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...
34
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.
6
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...
12
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...
5
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...
11
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.