3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $MensScores = Array("Day 1 Standing","Team", "All Around", "Floor","Pommel","Rings","Vault","Parallel Bars","High Bar"); $MensLevels = Array("Level 7 Under","Level 7 Open","Level 8 Under","Level 8 Open","Level 9 Under","Level 9 Open","Level 10 Under","Senior International"); echo "<Table cellpadding=2>"; echo "<td style='text-align: center;' colspan='10'><strong>Men's Artistic Gymnastics</strong></td>"; echo "</TR>"; foreach ($MensLevels as $Level){ echo "<TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> $Level</TD>\n"; foreach ($MensScores as $ScoreType){ $DIVName="MAG_".str_replace(" ","_",$Level)."_".str_replace(" ","_",$ScoreType); echo "<TD style='width: 9%;' valign='top'> <DIV ID=$DIVName>$ScoreType</DIV></TD>"; }; echo "</TR>\n"; }; echo "</Table>"; ?>
based on OrSPE
Output for 4.3.0 - 7.2.0
<Table cellpadding=2><td style='text-align: center;' colspan='10'><strong>Men's Artistic Gymnastics</strong></td></TR><TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 7 Under</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Under_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 7 Open</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_7_Open_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 8 Under</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Under_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 8 Open</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_8_Open_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 9 Under</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Under_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 9 Open</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_9_Open_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Level 10 Under</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Level_10_Under_High_Bar>High Bar</DIV></TD></TR> <TR bgcolor=#c0c0c0><TD style='width: 10%;' valign='top'> Senior International</TD> <TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Day_1_Standing>Day 1 Standing</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Team>Team</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_All_Around>All Around</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Floor>Floor</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Pommel>Pommel</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Rings>Rings</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Vault>Vault</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_Parallel_Bars>Parallel Bars</DIV></TD><TD style='width: 9%;' valign='top'> <DIV ID=MAG_Senior_International_High_Bar>High Bar</DIV></TD></TR> </Table>