PHP simple array question?

  • Thread starter Thread starter yeoys2003
  • Start date Start date
Y

yeoys2003

Guest
i have a question regarding array.

i have 3 attributes for each item (name, age, state)

how am i suppose to store it as an array?? and what is the code to view the arrays using a loop so i can see this:

His name is Tom, his age is 19 and he is from New York.
His name is John, his age is 32 and he is from Washington.
His name is Cody, his age is 25 and he is from Ohio.

thanks. please dont refer me to php.net, i just need someone to type the code for me. thanks
 
you can create a class and do these so you can combine those similar data entity's as your question is how to create array here it goes



var test = array();

now test is an array you can assign values like

test[0] = "Hello there";
test[1] = "Just a test" ;
 
you can create a class and do these so you can combine those similar data entity's as your question is how to create array here it goes



var test = array();

now test is an array you can assign values like

test[0] = "Hello there";
test[1] = "Just a test" ;
 
Back
Top