Because you stuck brackets [] at the end of your input names you only need to treat the corresponding $_POST variables as arrays and loop through them:
<?php
foreach($_POST['playername'] as $playername) {
create_game ($playername, $_POST['sex'], $_POST['finalscore']);
}
?>
This works great if you only want to submit the names of the players. However, you have no way of knowing which sex is attributed to which name using this method.
Assuming that the inputs will be sent in the same order as they display on the page, you might get away with using a for loop and an increment variable:
for($i = 0; $i < count($_POST['playername']); $i++) {
create_game ($_POST['playername'][$i], $_POST['sex'][$i], "no idea!");
}
I'd test that thoroughly before committing to use it!
Another way is to use a unique index for each input name to bind corresponding inputs together:
<form action="creategame.php" method="post">
<input type="text" name="player[0][name]" value="Player 1" size='35'><select name="player[0][sex]"><option>Male</option><option>Female</option></select><br>
<input type="text" name="player[1][name]" value="Player 2" size='35'><select name="player[1][sex]"><option>Male</option><option>Female</option></select><br>
<!--continue...-->
Then it should be as simple as:
<?php
foreach($_POST['player'] as $player) {
create_game ($player['name'], $player['sex'], '...still no idea...');
}
?>