Hello @ Edwin,
of course you can but let me say something
if .. else is used when u
need to execute one thing in case that requirement in if is met and
second thing if it is not met...
in case of if...elsif : command behind elsif is executed when
requirement in if is not metyou can add as many elsif as you
want...also u can end whole thing with else which is executed in case
when no previous requirements are met...
hope I wrote it goodsorry im too tired to think about english
grammar and such things ;)))
--
Best regards,
Martinmailto:corwin@;corwin.sk
Monday, October 28, 2002, 4:18:45 PM, you wrote:
E> Hello,
E> "Martin Hudec" <[EMAIL PROTECTED]> wrote:
>> or (from my point of view is this better)
>>
>> if {$country!="finland") :
>>display_shipping(calculate_nonfinland_cost($country));
>> elsif ($country=="finland" && $express=="no") :
>>display_shipping(calculate_shipping_cost($weight));
>> elseif ($country=="finland" && $express=="yes") :
>>display_shipping(calculate_express_cost($express));
>> endif;
>>
E> How about something like this?
E> if ($country!="finland"){
E>display_shipping(calculate_nonfinland_cost($country));
E> }else{ // if it's not "finland" it should be something else, no?
E> if ($express=="no"){
E> display_shipping(calculate_shipping_cost($weight));
E> }else{ // if it's not "no" it should be "yes", no?
E> display_shipping(calculate_express_cost($express));
E> }
E> }
E> Just an idea...
E> - E
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php