So I have a drop down box that displays all the entries in a column or a multidimensional array.
I want to be able to select one of the Teams (this is football related) from the drop down menu, and it show me the rows in the array where that team is selected.
my code:
Code:
<?php
	if(isset($_POST['formSubmit'])) 
	{
		$aTeams = $_POST['formTeams'];
		
		if(!isset($aTeams)) 
		{
			echo("<p>You didn't select a Team!</p>\n");
		} 
		else 
		{
			$nTeams = count($aTeams);
			
			echo("<p>You selected Team ");
			
				echo($aTeams . ", ");

			echo("</p>");
}
		
	}
?>
<form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post">
	<label for='formTeams'>Select the first team</label><br>

<select name="formTeams[]">
    <option value="0">Choose a Team</option>
    <?php showOptionsDrop($csvData, 'HomeTeam', null, true); ?>
</select>
<input type="submit" name="formSubmit" value="Submit" />
showOptionsDrop is a function that successfully populates the drop down box with the names of the teams in the column with the header HomeTeam.
The php code above is supposed to say you selected Team ...... however it always says You Selected Team Array?

How do I get it to show the name of the entry in the array csvData? And then display in a table all the entrys in the array where they are the HomeTeam?
Im quite new to php, Im getting on alright, just a couple of things that I havent completely got yet.