+ 1
how to make a output in php like this price1 price2 price3 total
2 Answers
+ 2
<?php
$price1 = $_get[input1];
$price2 = $_get[input2];
$price3 = $_get[input3];
function total($price1, price2, price3){
$total = $price+$price2+$price3;
return $total;
}
0
$price1 = 10;
$price2 = 20;
$price3 = 30;
$total = $price1 + $price2 + $price3;
echo "price1: $price1<br>";
echo "price2: $price2<br>";
echo "price3: $price3<br>";
echo "total: $total";