Disculpa por poner el style en el div pero así lo escribía rapido.
Se podría hasta usar un div o hacer el mismo método sólo con una imagen pero me vino así a la mente, ya mejoras tu el ejemplo.
Espero que te sirva.
Código PHP:
<?php
$imagen = "http://www.deathknell.cc/images/bargraph.gif";
$usuarios = 100;
$maximo= 600;
$porcentaje = ($usuarios * 100) / $maximo; // regla de tres
if($maximo >= $usuarios){
echo '<div style="height:25px; width:'.ceil($maximo/3).'px; float:left; position:absolute; background:#CCC;">';
echo '<div style="height:25px; width:'.$porcentaje.'%; float:left; position:relative; background:url('.$imagen.');"></div>';
echo '</div>';
}
?>
Un saludo.