I'm very new to PHP. I am trying to get the game (names) in a 5x5 table with 5 rows and 5 cols. But i want to generate the table by the number output of games and not a preset html table. i made it work that it shows the games but not in a table. Could you please help me and give me a good explaination so i understand too. Thank's already!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Merijn</title>
</head>
<body>
<?php
$games = array(
"battlefield 1",
"battlefield 2",
"Out of the Park Baseball 17",
"Overwatch",
"Stephen's Sausage Roll",
"Dark Souls III",
"Kentucky Route Zero - Act IV NEW",
"Stardew Valley",
"Ori and the Blind Forest",
"XCOM 2",
"World of Warcraft: Legion",
"Steins;Gate ",
"The Witness",
"Inside",
"Hex: Shards of Fate",
"Forza Horizon 3 ",
"Rise of the Tomb Raider",
"Total War: WARHAMMER",
"Chime Sharp",
"Pony Island",
"F1 2016",
"Day of the Tentacle Remastered",
"Tales from the Borderlands",
"DOOM",
"Hearthstone");
for($i =0; $i <=25; $i++){
echo '<table rows=5 cols=5>';
echo "<td>" . $games[$i] . "</td>" . "<br/>";
}
?>
</body>
</html>
$i < 25because you are starting this from 0