hey there
i have a form where im trying to pass an array through to a page called "show_stats.php"... the array is called $games_found and im passing it as a hidden field
here is the form im using to pass the array:
echo "<table width='100%' border='0'>";
echo "<form method='post' action='show_stats.php'>";
echo "<input type='hidden' name='year' value='$season'>";
// if only 1 player was found, then send over the games he was found in, to speed up stats mining
echo "<input type='hidden' name='games_found' value='$games_found'>";
echo "<tr><td><div align='center'><input type='radio' name='mine_name' width='25%' checked='yes'
value='$player_name'>$player_name</div></td></tr>";
echo "<tr><td><div align='center'><input type='submit' name='show_stats' value='Show stats'></div></td></tr>";
echo "<tr><td><div align='center'><a href='main.php'>Click here to search again</a></div></td></tr></table>";
this array contains 4 or 5 items usually.... but when i get the array in the "show_stats.php" page, it only contains 1 item.... and when i print the item out, it prints out as "A"
// get the games found
$games_search = "{$_POST['games_found']}";
$number_of_games = count($games_search);
print "$games_search[0] <br>"; // this prints out "A" for some reason
print "$number_of_games <br>";
why is the array not being passed properly? and where is the "A" coming from?
any help would be greatly appreciated