我喜歡解決通過郵局傳遞的數學公式。例如:如何解決通過郵局傳遞的數學公式
<form name="form1" method="post" action="">
<label for="f">Fórmula: </label>
<input type="text" name="f" id="f" value="<?=$_POST['f']?>">
<input type="submit" name="button" id="button" value="Submit">
</form>
$f = $_POST['f']; //Suppose the user typed: (A + B) * C as formula
使用該公式通過$_POST
(A + B)通過* C,並執行數學演算
A = 1; B = 2; C = 3;
$x = (A + B) * C // here the formula would be
$_POST[f] = (A + B) * C
echo $ x;
目前爲止你有什麼代碼? – 2013-03-03 16:11:07