Sorry couldn't think of a better subject for this email :(

This has stumped 7 people so far. I'm not an expert with php, but any help 
would be great.

I have the following

$Quantity1
$Quantity2
$Quantity3

and

$Price1
$Price2
$Price3

These variables will eventually make a "chart"/database with the following 
headings
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q1000000000
the number represents the number of quantity

so $Quantity1 uses $Price1 's value

so if $Quantity1 is 10
and $Price1 is $1.00
that means each "unit" is .10

so the output would be
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q1000000000
0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .10  .10  .10

Now the tricky part is $Quantity2 can either be blank or have a value
and if $Quantity2 has a value then $Quantity3 can either be blank or have a 
value

SO If $Quantity2 is 500
and $Price2 is $40.00
the output would now be
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q1000000000
0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .08  .08  .08

I think and hope you get the picture.

Things we know If there is no value for $Quantity2 then there will be no 
$Quantity3
and of course if either or both of those quantities are empty there will be 
no price.
And of course if there is a value for either of those quantities, there will 
be a price.


So what method would be best for doing this? Any functions that may come in 
handy?








_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to