Maybe I am late in answering and the answer will be used for future reference. I read your description and I can understand your concern. You want to fetch the maximum (Highest number ) value from the MYSQL database table in PHP. I'm right?
Let's discuss the max() function. The max() function is an in-built function in PHP. You can use the max() function to retrieve the maximum value and display that value on-page.
If you want to fetch the minimum number from the MySQL database table, then use the min() function of PHP. The min() function is also a in-built function in PHP.
<?php
$result =mysqli_query($mysqli, "SELECT MAX( column_name) as max , MIN(column_name) as min FROM mytable_name");
while($res = mysqli_fetch_array($result)) {
$max = $res['max'];
echo 'Highest Number :'.$max.'<br>';
$min=$res['min'].'<br>';
echo 'Lowest Number :'.$max.'<br>';
}
?>
This will produce the highest and lowest number from the database table.