LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: tedd Date: Fri May 9 11:21:23 2008 Subject: Re: Why doesn't working with array's ever stick in my thick
head?
At 12:56 PM -0400 5/9/08, Jason Pruim wrote: >Hi Everyone, > >SO it's friday, I'm tired, and I can't seem to think straight... I >am attempting to do some very basic math with some arrays... Here's >the pseudo code that I'm working with: > >NumberOfPieces * PieceWeight = TotalWeight > >explode total weight to get tenth's of pounds, then divide tenth's >of pounds by 16 to grab ounces. What?? Why do you want tenth's of pounds? Just divide pounds by 16 and you'll get ounces. --- >Display TotalWeight # Exploded Ounces. > >Which I have working just fine for a single set of boxes... > >My problem is I want to be able to automatically add say 50 boxes in >a form to process the weight of each route... How much does each box weight and how many boxes? That's all you need. --- >So what I need to do is probably use some kind of a counter to loop >through my $RoutePieces array and multiply by the $PieceWeight? >$PieceWeight is a static number. Is $PieceWeight is a static number? The last time I checked, the cost per oz for shipping depends upon the weight. The more weight, the less the cost per ounce. Is that not true? --- As for the code, that's pretty simple. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com
| Navigate in group php.general at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |