Re: [PHP] Shipping Rates

2003-06-04 Thread Jaap van Ganswijk
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

Re: [PHP] Shipping Rates

2003-06-03 Thread Jim Lucas
; } } Correct me if I am wrong. Jim Lucas - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Ralph [EMAIL PROTECTED] Cc: PHP General Mailing List [EMAIL PROTECTED] Sent: Sunday, June 01, 2003 2:26 AM Subject: Re: [PHP] Shipping Rates Better approach in what sense? From

Re: [PHP] Shipping Rates

2003-06-03 Thread Jim Lucas
, 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, '8.45'=35, '9.45'=55, '10.45'=80, '11.45'=100

RE: [PHP] Shipping Rates

2003-06-03 Thread Ford, Mike [LSS]
-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 was a good

[PHP] Shipping Rates

2003-06-01 Thread Ralph
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

RE: [PHP] Shipping Rates

2003-06-01 Thread Ralph
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 to figure this out. I want to show a shipping price

Re: [PHP] Shipping Rates

2003-06-01 Thread Rasmus Lerdorf
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