At 2003-06-01 01:48 -0700, Ralph wrote:
>Maybe it's just that it's late, but can't seem to figure this out. I
>want to show a shipping price depending on the amount of purchase. I
>thought about using a lot of if() statements, but I know this is not the
>best way to go about this.
>
>Can anybody en
> -Original Message-
> From: Jim Lucas [mailto:[EMAIL PROTECTED]
> Sent: 02 June 2003 18:07
> To: Jim Lucas; Rasmus Lerdorf; Ralph
>
> Answering my own answer. I see now how you are extracting
> the sub array
> information.
>
> My mistake.
Notwithstanding that, I think your question wa
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2003 9:57 AM
Subject: Re: [PHP] Shipping Rates
> is this correct?
>
> wouldn't you want the array to be like this?
>
> $rates = array('7.45'=>20,
>
) continue;
else { $price = key( $rates[$i] ); break; }
}
Correct me if I am wrong.
Jim Lucas
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Ralph" <[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAI
Better approach in what sense? From a performance perspective you are not
going to beat a specific set of if conditions unless there is an distinct
formula you can apply. I will assume there is no simple mathematical
relationship for your full set of data and what you are really looking for
is a
Rates
this, maybe?
http://www.php.net/switch
>From: Ralph <[EMAIL PROTECTED]>
>To: PHP General Mailing List <[EMAIL PROTECTED]>
>Subject: [PHP] Shipping Rates
>Date: Sun, 01 Jun 2003 01:48:30 -0700
>
>Maybe it's just that it's late, but can't seem t
Maybe it's just that it's late, but can't seem to figure this out. I
want to show a shipping price depending on the amount of purchase. I
thought about using a lot of if() statements, but I know this is not the
best way to go about this.
Can anybody enlighten me on this one and give me a better ap
7 matches
Mail list logo