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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.