need Array help

Posted on 16th Feb 2014 by admin

This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Giants"
$teamname[3] = "White Sox"
$teamname[4] = "Cubs"
$teamname[5] = "Cubs"
Interface: Number 1 to 5;
Output: "The [name] won World Series number .

This is what I have so far. <?
$array=array('Red Sox', 'Giants', 'White Sox','Cubs' ,'Cubs');



print_r($array );
echo "
";
foreach( $array as $key => $value){echo $value ." "; }















?>

<form method = "post" action = "">
<input type = "Submit" value = "Who won the series?" />
</form>

I'm not sure what to do next.

Other forums