Re: IF or SWITCH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 05 April 2006 20:11, Robert Cummings wrote:
> Well I'd use if/elseif/else but I don't format like you...
>
> <?php
> if( $numFFELP > 1
>     &&
>     count( $FFELP_Lenders ) > 1
>     &&
>     $numFFELP == $numTotal )
> {
>     $retVal = array( TRUE, 'A' );
> }
> else
> if( $numFFELP > 0
>     &&
>     $enumFFELP > 0
>     &&
>     count( $FFELP_Lenders ) > 1
>     &&
>     ($enumFFELP + $numFFELP) == $numTotal )
> {
>     $retVal = array( TRUE, 'A' );
> }
> else
> if( $numFFELP > 0
>     &&
>     $numCONS > 0
>     &&
>     count( $FFELP_Lenders ) > 1
>     &&
>     ($numFFELP + $numCONS) == $numTotal )
> {
>     // Wheeeeeeeeeeeeeeeeeeee!
> }
> ?>
>
> Yeah it's vertically sprawling, yeah it looks tedious to type, but damn
> is it clear *lol*. Once you get into a habit it becomes second nature.
>
> Cheers,
> Rob.

Thanks for the input.  I especially like the Wheeeeeee part.  Maybe I'll add 
that in there... it's been a long day *lol*
-- 
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux