Jump to content

[SOLVED] Create a simplified array from another array?


Recommended Posts

I have finally been able to do a MySQL query from my database to bring back the "teamids" that I need.  The array that prints the info below is called "$threeresults".  My question is this...how can I create an array that has ONLY the "teamid" values (and eliminates the other stuff)? 

 

In other words, I would want an array that has simply [1,2,3,11,17,18,23,27] (which are the 'teamids" from the array info below). 

 

Array ( [0] => 1 [teamid] => 1 [1] => 3 [count] => 3 ) Array ( [0] => 2 [teamid] => 2 [1] => 3 [count] => 3 ) Array ( [0] => 3 [teamid] => 3 [1] => 3 [count] => 3 ) Array ( [0] => 11 [teamid] => 11 [1] => 3 [count] => 3 ) Array ( [0] => 17 [teamid] => 17 [1] => 3 [count] => 3 ) Array ( [0] => 18 [teamid] => 18 [1] => 3 [count] => 3 ) Array ( [0] => 23 [teamid] => 23 [1] => 3 [count] => 3 ) Array ( [0] => 27 [teamid] => 27 [1] => 3 [count] => 3 )

 

 

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.