Pour le php je te conseil donc la librairie
[ Lien ]Cela dis, i c'est juste pour afficher les résultats d'un sondage, le CSS conviendrais très bien :
Exemple en CSS : Sur 20 votants, 10 on répondus Oui, 5 Non, et tu as 4 votes blanc...
<?php
$oui = 10;
$non = 5;
$anno = 5;
$total = 20;
// pourcentages
$prcentoui = round(($oui/$total)*100);
$prcentnon = round(($oui/$total)*100);
$prcentanno = round(($oui/$total)*100);
?>
<h1>Mon résultat de sondage</h1>
<b>Oui :</b> <?php echo $prcentoui.'% ('.$oui.')'; ?>
<div style="display:block; height:20px;wight:<?php echo $prcentoui; ?>%;background:green;"></div>
<b>Non :</b> <?php echo $prcentnon.'% ('.$non.')'; ?>
<div style="display:block; height:20px;wight:<?php echo $prcentnon; ?>%;background:red;"></div>
<b>Sans avis :</b> <?php echo $prcentanno.'% ('.$anno.')'; ?>
<div style="display:block; height:20px;wight:<?php echo $prcentanno; ?>%;background:#CCCCCC;"></div>
<b>Total : <?php echo $total; ?> votant(s)</b>
Tonio