php functions can have many returns. Proccessing stops (and returns) at
the first one the program logic reaches:
<?php
switch ($a_number) {
case 1:
return "one";
break;
case 2:
return "two";
break;
default:
return "not one or two";
break;
}
(note: those breaks are not required because program flow returns
before they are reached, but it helps readablilty in long code blocks)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---