Jump to content

[SOLVED] Create a simplified array from another array?


galvin

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 )

 

 

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.