I need help in getting a php script I have been working on for a while finished. I came to a stopping point (brick wall) today when I tried to execute flow control inside of an array. Can someone please tell me if it is possible to use logic inside of an array?
An example of what I would like to do is:
$shippingCost = $baseShippingCost * $shippingBoxArr['numberOfBoxes'];
$shippingBoxArr is an arrray and I would like to apply the following logic while the array "runs", but am not sure how to do it:
if ($endTotalShippingCost = ('$dryIceCost + $totBoxCost + $ups_res_charge + $ups_dist_charge')) {$endTotalShippingCost=1000000;}
else {$endTotalShippingCost=$endTotalShippingCost;}
I would appreciate any help I can get on this!