The smallest number in the array is 1.
The largest number in the array is 56.
The largest number in the array is 56.

Code:

<html>
<head>
<title>PHP TEST YAHHH</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>

<div class="topbar">
<?php
include 'navbar.php';
?>

</div>

<?php

    
    //arrayssssssssssssssss
    
    
    $numbers = array(5,2,7,1,8,9,24,56,3);
    
    //sort array
    sort($numbers);
    
    //smallest number
    echo 'The smallest number in the array is ';
    print_r($numbers[0]);
    echo '.';
    echo '<br>';
    
    //largest number
    $largemarge = count($numbers);
    echo 'The largest number in the array is ';
    print_r($numbers[$largemarge - 1]);
    echo '.';
    echo '<br>';
    
    //largest number easier way
    rsort($numbers);
    echo 'The largest number in the array is ';
    print_r($numbers[0]);
    echo '.';
    echo '<br>';
    
    /* outputs in this format:
    
        The smallest number in the array is 1.
        The largest number in the array is 56.
        The largest number in the array is 56.

    */
    
    
    
?>
    

<div class="codebox">
<h3>Code:</h3>
<?php
highlight_file("ex015.php");
?>
</div>



</body>

</html>