0

Pls, how do i create a simple calculator with php

pls answer if possible show some code

30th Jun 2018, 8:58 PM
Manzuma Memunat
Manzuma Memunat - avatar
2 Respostas
+ 4
the same way you create a calculator with every other language that can do ++x
30th Jun 2018, 9:22 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Answer</title> </head> <body> <p>The answer is: <?php if($_POST['group1'] == add) { echo "$first + $second"; } else if($_POST['group1'] == subtract) { echo "$first - $second"; } else if($_POST['group1'] == times) { echo "$first * $second"; } else($_POST['group1'] == divide) { echo "$first / $second"; } ?> </p> </body> </html>
30th Jun 2018, 10:53 PM
Armin