Zephyranthes Zephyranthes - 2 months ago 17
PHP Question

PHP multiplication string

I have just begun learning PHP, and I have been working on a practice page for finding the cubic volume of a cube. The information is taken from submissions on an html form and I have written the code for taken the submitted information as the variables but I am not entirely sure how to set up the result.

here is my code so far

<?php

#Script -index.php
#Created 9/20/2016
#Created by
#Script calculates cubic volume

$length=$_POST[“length”];

$width=$_POST[“width”];

$height=$_POST[“height”];

$result=


?>


I am just not sure how to format the $result line so that it will properly multiply the length, width, and height.
I also apologize for such a beginner question, I just couldn't find the answer at other sources.

Answer
$result=  $length * $height * $width;
echo $result;