Exemple #1
0
                        } else {
                            $percentage = number_format($array_value[$x] / $array_value[2] * 100, 2);
                        }
                        echo "<td align='right' style='padding-right:5px;'>" . $array_value[$x] . "</td>";
                        echo "<td align='right'style='background-color:cyan;'>" . $percentage . "</td>";
                    } else {
                        echo "<td align='right'> <strong>" . $array_value[$x] . "</strong> </td>";
                    }
                }
                unset($array_value);
                echo "</tr>";
            }
        }
    }
}
$query = new mySqlQuery();
//}
?>
</head>
<body>
	<table style='width:898px'>
		<tr>
			<th rowspan='2' style='width:150px;background-color:#660099;color:#fff'>RHU</th>
			<th rowspan='2' style='width:300px;background-color:#660099;color:#fff'>Class Name</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>Under 1</th>
			<th rowspan='2' style='background-color:#660099;color:#fff'>Total</th>
		</tr>
		
		<tr>
			<th style='width:40px;background-color:#660099;color:#fff' >M</th><th style='width:40px;background-color:#660099;color:#fff'>%</th>
			<th style='width:40px;background-color:#660099;color:#fff' >F</th><th style='width:40px;background-color:#660099;color:#fff'>%</th>
Exemple #2
0
                        } else {
                            $percentage = number_format($array_value[$x] / $array_value[30] * 100, 2);
                        }
                        echo "<td align='right' style='padding-right:5px;'>" . $array_value[$x] . "</td>";
                        echo "<td align='right'style='background-color:cyan;'>" . $percentage . "</td>";
                    } else {
                        echo "<td align='right'> <strong>" . $array_value[$x] . "</strong> </td>";
                    }
                }
                unset($array_value);
                echo "</tr>";
            }
        }
    }
}
$query = new mySqlQuery();
//}
?>
</head>
<body>
	<table style='width:1630px'>
		<tr>
			<th rowspan='2' style='width:150px;background-color:#660099;color:#fff'>RHU</th>
			<th rowspan='2' style='width:300px;background-color:#660099;color:#fff'>Class Name</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>Under 1</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>1-4</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>5-9</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>10-14</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>15-19</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>20-24</th>
			<th colspan='4' style='background-color:#660099;color:#fff'>25-29</th>