Jump to content

Recommended Posts

Hello all,

 

I'm making a table called "tournament_config". It will have the following:

 

fid = int(11) auto_inc, primary key

clanh = int(11)

clana = int(11)

map = varchar (225)

timestamp = int(11)

 

I want to make a list of maps. E.g. map1, map2, map3, map4. That I can pull from the database and split up. E.g. In week one clans will play map1, in week two clans can play map3.

 

Will I be able to pull that array and break down the maps so I can do this? E.g. $map = $result['map']; Then $map[week1] would = map1.

 

Thanks for your help.

Link to comment
https://forums.phpfreaks.com/topic/63070-solved-pulling-an-array/
Share on other sites

Here's an example.

 

In my table I have inserted:

 

tid: 1

name: My Tournament

max_clans: 32

maps: de_dust, de_dust2, de_aztec, cs_assault, cs_office

Timestamp: 02/08/2007

 

I want to pull "maps" aka "de_dust, de_dust2, de_aztec, cs_assault, cs_office" from my database table and put them in to an array. Then I can use the array and call the maps inside. E.g. $map[week1] = de_dust, $map[week2] = $de_dust2. How do I turn "maps" in to an array?

 

Each tournament might have a different number of maps, otherwise I would have just made a column for each map, instead of calling it maps.

 

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.