Php从用户获取号码

问题描述:

我想编写一个php程序,提示用户输入他/她希望的数字。号码输入的终止应该用字母N或n来完成。一旦数字输入完成,程序预计将打印数字的最大值,最小值,平均值,模式和中位数以及直方图。



我只是想要学习如何从用户那里获取他/她希望的号码和终止号码。



我尝试了什么: b $ b

I want to write a php program that prompts user to enter as many numbers as he/she wishes. The termination of number entry should be done by the letter N or n. Once the number entry is completed the program is expected to print the max, min, average, mode and median of the numbers alongside with a histogram.

I just want to learn how to take number from a user as many number as he/she wishes and make the termination.

What I have tried:

<html>
<body>
<form action="example.php" method="post>
Enter a number:
<input type="number_format" name="number"> <br> <br>
<input type="submit" value="submit">
</form>
</body>
</html>




------





------

<?php

$num = $_POST=['number'];



?>

num =
num =


_POST = [' 号跨度>];



?>
_POST=['number']; ?>