Código PHP:
   <?php
 
$datosTabla = array(  
              array( "Pantalones", 8, "#bdda4c"),
              array( "Remeras", 8, "#ff9a68"),
              array( "Camperas", 10, "#69abbf"),
              array( "Otros", 2, "#ff4848")
);
 
$maximo = 0;
foreach ( $datosTabla as $ElemArray ) { $maximo += $ElemArray[1]; }
?> 
<table width="400" cellspacing="0" cellpadding="2">  
<?php foreach( $datosTabla as $ElemArray ) {  
$porcentaje = round((( $ElemArray[1] / $maximo ) * 100),2);  
?>
<tr>
<td width="30%"><strong><?php echo( $ElemArray[0] ) ?></strong></td>
<td width="10%"><?php echo( $porcentaje ) ?>%</td>
<td>
<table class="etable" width="<?php echo($porcentaje) ?>%" bgcolor="<?php echo($ElemArray[2]) ?>">
<tr><td></td></tr>
</table>
</td>
</tr>
<?php } ?>
</table>   espero se haya entendido y espero me ayuden y si les sirve el script copienlo que funciona de verdad... Gracias
 

