我想总结结果 1 和结果 2 我该怎么做请帮我解决这个问题
谢谢
示例:$res + res1 =最终结果
这是结果 1 代码
<?php //Starting of php
if(isset($_POST['submit']))//if the submit button has pressed
{
$first = $_POST['first']; //Getting Value of first integer from add.html
$sec = $_POST['sec']; //Getting Value of Second integer from add.html
$res = $first * $sec *75 /365 /30; //Adding the two values and placing the added result to 'res' variable
echo 'Added Result:';
echo number_format((round($res, 1)),3);
}
//Ending of php
?>
这是第二个结果代码
<?php //Starting of php
if(isset($_POST['submit']))//if the submit button has pressed
{
$days1 = $_POST['days1']; //Getting Value of first integer from add.html
$year1 = $_POST['year1']; //Getting Value of Second integer from add.html
$res1 = $days1 * $year1 *75 /365 /30; //Adding the two values and placing the added result to 'res' variable
echo 'Added Result:';
echo number_format((round($res1, 1)),3);
}
//Ending of php
?>