Hello everyone,
I'm new to PHP and need some help with a variable problem i'm having...Basically I have a variable named $quote. I would like to add a case statement or something of that matter so that when a seperate variable named $product changes in the script, then the value of $quote changes...
Here is my code now...forgive me if i'm way off...
$quote = switch ($product) {
case "GND";
= $quote + $handling_charge - ($quote * .70);
break;
case "1DP";
$quote = $quote + $handling_charge - ($quote * .20);
break;
case "2DA";
$quote = $quote + $handling_charge - ($quote * .10);
break;
}
So basically if $product changes from 1DP to 2DA or whatever, then the value of $quote needs to change because each case has a different value for $quote.
Any help would be great...