need Array help


Posted on 16th Feb 2014 07:03 pm 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.

No comments posted yet

Your Answer:

Login to answer
248 Like 38 Dislike
Previous forums Next forums
Other forums

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

Error in query: Resource id #4??
hey guys, having a minor (i think) problem here that i havent been able to figure out. long story sh

Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get

Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

update the selected existing records of database
Hi frndz,
I am new to php and get stuck....

Edit.php > Update.php > Updatea

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash