I use this code to echo values from an array generated from a mysql query
while($row = mysql_fetch_array($result)) {
echo $row[0];
echo ' ';
echo $row[1];
echo "% ";
echo "<br>";
}
to produce a result like:
CC 77.6%
CT 21.9%
TT 0.5%
Which is fine.
I would like to have the 3 pairs of values available to use in a bootstrap progress bar div so that I may represent the information in a more visual manner.
How can assign the values from the array into variables?
EDIT
Sample result set
Array (
[0] => AA
[alleles] => AA
[1] => 6
[total] => 6
[2] => 25.00
[percentage] => 25.00 )
Array (
[0] => AG
[alleles] => AG
[1] => 11
[total] => 11
[2] => 45.83
[percentage] => 45.83 )
Array (
[0] => GG
[alleles] => GG
[1] => 7
[total] => 7
[2] => 29.17
[percentage] => 29.17 )
First of all, use two div. first for name of that progress bar. Other one for value.
This is the code dude.. use this..