?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?breking the loop and continuing
Author:??(---.wlink.com.np)
Date:???01-25-05 22:05

I wanna know is it possible to break the loop and continue the loop in somewhere else
for example
for($i=0;$i<=15;$i++)
{
print $i."
";
if($i>=5)
{
break;
}
}

it only print up to
0
1
2
3
4
5


now i want to continue to print from 6 to 15 somewhere else in the page how to do that is this code right or not or is it possible to break the loop and continue
i'd be glad if u help me

i just want do do it in photo gallery
here are the codes i just want 3 rows in one table and
2 rows in another table by using that code





Deurali Janta































?
? ?






?
















home
> photo gallery
Photo
Gallery








$k=1;
for($i=1;$i<=5;$i++)
{
print "";
for($j=1;$j<=3;$j++)
{

print "";
$k++;
}

print "";
}





?>



?



?
?


?Topics Author? Date
?breking the loop and continuing??new
sam 01-25-05 22:05?
?Re: breking the loop and continuing??new
bastien 01-26-05 07:50?
?Re: breking the loop and continuing??new
steve 01-27-05 00:10?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > I wanna know is it possible to break the loop and continue > the loop in somewhere else > for example > for($i=0;$i<=15;$i++) > { > print $i."
"; > if($i>=5) > { > break; > } > } > > it only print up to > 0 > 1 > 2 > 3 > 4 > 5 > > > now i want to continue to print from 6 to 15 somewhere else > in the page how to do that is this code right or not or is it > possible to break the loop and continue > i'd be glad if u help me > > i just want do do it in photo gallery > here are the codes i just want 3 rows in one table and > 2 rows in another table by using that code > > > > > > Deurali Janta > charset=iso-8859-1"> > type="text/css"> > > > > > leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> > cellspacing="0" class="leftMenu"> > > > > > > > > > >
height="80" border="0" cellpadding="0" cellspacing="0" > class="caption" id="Table_01"> > > > > > > > > > > > > > >
  > src="../../prac/deurali/images/alpha_02.gif" alt="" > width="70" height="80" border="0"> src="../../prac/deurali/images/alpha_03.gif" width="651" > height="55" alt="">
  > bgcolor="#C0C9FA"> 
width="49" height="1" alt=""> width="651" height="1" alt="">
cellspacing="0" class="leftMenu"> > > > > > >
  > cellspacing="0" class="caption"> > > > > > > >
width="100%" border="0" cellpadding="0" cellspacing="0" > class="bodytext"> > > > > > > > > > >
bgcolor="#FCFCFE" class="caption"> href="gallery/index.php">home > > photo > gallery
class="pageTitle"> width="1" height="1">
class="pageTitle">Photo > Gallery
> > > > >
> > > $k=1; > for($i=1;$i<=5;$i++) > { > print ""; > for($j=1;$j<=3;$j++) > { > > print ""; > $k++; > } > > print ""; > } > > > > > > ?> > >
href=\"#\" > onClick=\"MM_openBrWindow('images/gallery/main.php?id=$k','gallery','392','276')\" return true\">
> >

 

> >
 
  >
> > ">??

Provided By
Phorum