Jump to content

Array help


Drippingblood123

Recommended Posts

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 "<br>";
          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.

Link to comment
https://forums.phpfreaks.com/topic/179575-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.