On 13 August 2004 12:52, Jay Blanchard wrote: > if( strlen( $UserID ) != 0 > && strlen( $UserPassword ) != 0 > && strlen( $SecretPassword ) != 0 > && strlen( $UserMail ) != 0 ) > { > Do something > } > elseif ( strlen( $UserID ) == 0 > > > strlen( $UserPassword ) == 0 > > > strlen( $SecretPassword ) == 0 > > > strlen( $UserMail ) == 0 ) > { > Do Something else > }
In fact since the elseif condition is the exact logical complement of the if condition (by application of deMorgan's rules), you only need: if( strlen( $UserID ) != 0 && strlen( $UserPassword ) != 0 && strlen( $SecretPassword ) != 0 && strlen( $UserMail ) != 0 ) { Do something } else { Do Something else } Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php