如果$ player在第三个范围内介于5到9之间,则运行php代码

Ok i edit my question i think i understand more now how to build a question.
The website: bit DOT ly/1MHItEH

I want to run a php code when span 3 is between 5 & 9.
The code which outputs this is $players and in the bottom there is a html output code

<td><span style='text-shadow: 0 0 10px #ffca00; color: #ffca00; font-size: 20pt;'>". $players ."</span></td>


This php code outputs a html table with different values for every added server.

For example if i add a new server to servers.php it will create a new span for that server with new values. So basicly it reads and outputs different values for every server.
So how can i just run extra php code if the span 3 is between 5 & 9?

<html>
<head>
<meta charset="utf-8">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<style>
            tr td, tr th { text-align: center !important; }
            tr td.motd, tr th.motd { text-align: left !important; }
</style>

</head>

<body style="width: 100%; margin: 0 auto; height: 20px; ">

<table class='table table-bordered table-striped'>    

</br>         
            
            <?php
            error_reporting(0);
            
            function openserveriai() {

            }

            function closeserveriai() {

            }

            function getnextstring(&$data) {
                $temp="";
                $counter=0;
                while (ord($data[$counter++])!=0) $temp.=$data[$counter-1];
                $data=substr($data,strlen($temp)+1);
                return $temp;
            }
                
            function getnextbytevalue(&$data) {
                $temp=ord($data[0]);
                $data=substr($data,1);
                return $temp;
            }

            function addServer($ip) {
                
                $map = '';
                $players = '';
                $maxplayers = '';
                $servername = '';
                $output = '';
                $live_server = '0';
                $packet = '0';
                $packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
                $live_server = fsockopen("udp://".$ip);
                 
                if(!$live_server)
                {
                    $output = "Off";
                }
                else
                {
                    fwrite($live_server, $packet);
                    socket_set_timeout($live_server,1,0);
                    $junk = fread($live_server,5);
                    $status = socket_get_status($live_server);
                    $do = 1;
                    $server_info= "";
                     
                    while($do)
                    {
                        $str_1 = fread($live_server,1);
                        $server_info .= $str_1;
                        $status = socket_get_status($live_server);
                        if($status["unread_bytes"] == 0) {$do = 0;}
                    }
                    fclose($live_server);
                     
                    if (strlen($server_info) > 0)
                    {
                        $success = 1;
                        $junk = getnextstring($server_info);
                        $servername = getnextstring($server_info);
                        $map = getnextstring($server_info);
                        $junk = getnextstring($server_info);
                        $junk = getnextstring($server_info);
                        $players = getnextbytevalue($server_info);
                    }
                     
                    if ($players != '') {
                        $players = $players;
                    } else {
                        $players = "0";
                    }
                     
                    if ($maxplayers != '')
                    {
                        $maxplayers = $maxplayers;
                    }
                    else
                    {
                        $maxplayers = "0";
                    }

                    if ($output != "Full" and $players != "0" or $maxplayers != "0")
                    {
                        $output = $output;
                    }
                    else
                    {
                        $output = "<font color='#FF0000'>Offline</font>";
                    }

                    if ($map != '')
                    {
                        $map = $map;
                    }
                    else
                    {
                        $map = "--";
                        $maxplayers = "--";
                        $players = "--";
                    }

                    if ($servername != '') {
                        $servername = $servername;
                    }
                    else
                    {
                        $servername = "--";
                    }
                }
                if($players == $maxplayers && $players != '--')
                {
                    $players = "" . $players . "";
                }
                else if($players > $maxplayers-3 && $players != '--')
                {
                    $players = "" . $players . "";
                }
                else
                {
                    $players = "" . $players . "";
                }
                if ( strlen($map) > 19 )
                {
                    $map = substr($map, 0, 19) . '...';
                }
                
                echo "
                    <tbody>
                        <tr style='background: #10130d;'>
                ";
                if ($map == '--')
                {
                    echo "<td><span style='background-color: #b85c5c; border-radius: .25em; padding: .2em .6em .3em; font-weight: bold; color: #fff; font-size: 10pt;'>Offline</i></span></td>";
                }
                else
                {
                    echo "<td><span style='background-color: #5cb85c; border-radius: .25em; padding: .2em .6em .3em; font-weight: bold; color: #fff; font-size: 10pt; '>Online</i></span></td>";
                }
                echo "      
                
                <td><span style='color: #fff; font-size: 10pt;'>". $ip ."</span></td>
                <td><span style='text-shadow: 0 0 10px #ffca00; color: #ffca00; font-size: 20pt;'>". $players ."</span></td>
                </tr>
                </tbody>
                ";
            }

            openserveriai();

            include ('servers.php');

            closeserveriai();
            
            ?>
        </table>
    </body>
</html>

</div>

You can do something like this

 <?php
        $total = 5;
        if ($total >= 5 && $total <= 9) {
             //Between 5 and 9
        } else {
            // Not between 5 and 9
        }
  ?>

<table class='table table-bordered table-striped'>  
    <tbody>
    <tr>
    <td><span>First</span></td>      
    <td><span>Second</span></td>
    <td><span><?php echo $total; ?></span></td>
    </tr>
    </tbody>
</table>

Then you can call that php page with

require('yourpage.php');