My Array looks like this:
Array (
[Team] => Array (
[0] => Array (
[Name] => Team A [Played] => 0 [Wins] => 0 [Draws] => 0 [Losses] => 0 [Gd] => 0 [Points] => 0 )
[1] => Array (
[Name] => Team B [Played] => 0 [Wins] => 0 [Draws] => 0 [Losses] => 0 [Gd] => 0 [Points] => 0 ) ) )
I want to be able to remove a team with a particular name, say Team A.
I, myself always like to use a foreach loop instead of counting and using a for loop. Just my preference. Also, In one of the previous answers it was recommended to use array_splice, however unset works better here – unless you are wanting to put the removed team into a new array, which is what you’d typically use array_splice for. Unset would, I believe, save some memory.