[snip]
<?php
if ($option1)
{
  while(something())
  { do_1(); }
}
elseif ($option2)
{
  while (something())
  { do_2(); }
}
  // ... continue for 10 or more options...
[/snip]

Theoretically the second one is faster because it only executes the
while loop when the condition is met. The first one will loop through
all of them unless you break; after the suplied conditions.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to