Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member anamika88's Avatar
    Join Date
    Mar 2006
    Location
    UAE
    Posts
    1
    Member #
    12913
    I jus wanted to know tht how do u convert a loop into another..for eg converting an if loop to a for loop or a do while loop to a while wend loop etc. Can anyone gimme similar examples on all kinds of loop conversions..itz really gonna help me!

  2.  

  3. #2
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    if($i < 10) {
    print "something";
    }

    =

    for($i = [some value]; $i < 10; $i++) {
    print "something";
    }

    ------------------------------------------------

    do {
    $i += 2;
    } while ($i < 10)

    =

    $i += 2;
    while($i = [value]) {
    $i += 2;
    }

    Does this help at all?
    (And if I messed up somewhere, somebody please let me know.)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:44 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com