So far, and I'm sure this looks extremely basic to those who know... but hey, that's why you get the big bucks, I've managed to get some "middle" functionality to the code I've written.
The "front" end of this code needs to pass the price from the MySQL database to the loop, no problem there I figure. And I need to ADD a database field to the Admin (product details) area to allow for the input of a custom $minqty for each item.
Also, I figure I need to find how to express the $price and "Pieces" columns as aligned left and 2 decimal places. I'm not clear on this at all yet.
The "rear" needs to make the resulting selected (either by checkbox or hyperlink, maybe?) Price/Quantity pass to the shopping cart.
Lastly there is the mater of getting the whole thing nice and pretty looking and visible on the appropriate page.
Later modifications hope to include:
"Must be an increment of $minqty to be valid." OR
"If not an increment of $minqty, is invalid."
For those who want to declare a quantity themselves.
Anyone willing to give advise in these endeavours will recieve my highest praise and lifelong indebtedness... Just like saving a Native Americans life!
My code thusfar:
<?PHP
$price = 2.50;
$count = 1;
$minqty = 6;
$perpkg = $minqty;
for ($count = 1; ; $count++) {
if ($count > 5) break;
echo "$perpkg Pieces = $ " . $perpkg*$price . "<br>";
$perpkg = $minqty+$perpkg;
}
?>
Big, Big Thanks!
You've all given me excellent brainfood.
ArtistRich