Thank you Oni - Kun,
I am still getting the undefined index error, however, here is how i implemented your response:
<html>
<head>
<title>Array Finder</basic>
</head>
<body>
<h2>Geuss all the numbers in the array!</h2>
<br />
<form method="post">
<input name="number" type="text" </input>
<input name="submit" type ="submit" </input>
</form>
<br />
<?php
if (isset($_POST['Sumbit'])) {
echo "Try another number!";
} else {
echo "Please enter a number." . "<br />";
}
if (isset($_POST['number'])) {
$findNumber = $_POST['number'];
} else {
$findNumber = "0";
}
$array1 = array(5,9,10,45,98,101);
$maxArray = max($array1);
$minArray = min($array1);
$findNumber = $_POST['number'];
echo "<br />";
if(in_array($findNumber, $array1) == true) {
echo "Yes, that number is in the array." . "<br />";
} else {
echo "No, that number is not in the array." . "<br />";
}
if((max($array1) == $findNumber)) {
echo "That is the largest number in the array." . "<br />";
} else {
echo "No, that is not the largest number in the array" . "<br />";
}
if((min($array1) == $findNumber)) {
echo "Yes, that is the smallest number in the array." . "<br />";
} else {
echo " No, that is not the smallest number in the array." . "<br />";
}
?>
</body>
</html>
I must be doing something wrong here, again, all advice appreciated.
ktstowell