How can PHP be used to display server load percentage?

To display the server load percentage using PHP, you can use the `sys_getloadavg()` function which returns an array containing the 1, 5, and 15-minute load averages. You can then calculate the load percentage by dividing the load average by the number of CPU cores and multiplying by 100.

$load = sys_getloadavg();
$numCores = trim(shell_exec("nproc"));
$loadPercentage = ($load[0] / $numCores) * 100;

echo "Server Load Percentage: " . round($loadPercentage, 2) . "%";