Predict the output of the following PHP code segment. function cost($price, $quantity) { $price *= 1.20; e
Posted: Sun May 15, 2022 12:26 pm
Predict the output of the following PHP code segment.
function cost($price, $quantity) {
$price *= 1.20;
echo "cost is " . ($price * $quantity +
0.8) . "<br />";
}
$x = 2; $y = 3;
cost($y, $x);
function cost($price, $quantity) {
$price *= 1.20;
echo "cost is " . ($price * $quantity +
0.8) . "<br />";
}
$x = 2; $y = 3;
cost($y, $x);