Jump to content

[SOLVED] Question about arrays


graham23s

Recommended Posts

Hi Guys,

 

i was going to use arrays to store data into mysql from a form i would get this:

 

     $sports_type = array('Football'=>'Football.gif',
                            'Basketball'=>'Basketball.gif');

 

so when the form is submitted the name = sports, right now it stores Football or Basketball into mysql, but on another page i wanted to display the results in a table and under sports i wanted the .gif to be displayed, i was wondering the best way to go about this?

 

thanks for the help guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/51673-solved-question-about-arrays/
Share on other sites

Sure basically this:

 

when a user select a sport from a drop down list say "football", when it comes to storing that information in the database i wanted a .gif i.e football.gif to be inserted, so when i echo a table out later under the category "football" there will be a .gif INSTEAD of the actual word football.

 

hope that makes sense

 

cheers

 

Graham

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.