dpd66100
2014-10-01 21:39将MySQL查询转换为多维数组
I'm having trouble tackling this one. I have a set of data that is returned from a MySQL query like this:
url | users
https://www.facebook.com/ | patrick
https://www.google.com/ | patrick
https://www.reddit.com/ | bob
https://www.bing.com/ | bob
https://www.yahoo.com/ | bertha
where '|' is the field separator.
I need to parse this data using PHP to form a multidimensional array that looks like this:
patrick
https://www.facebook.com/
https://www.google.com/
bob
https://www.reddit.com/
https://www.bing.com/
bertha
https://www.yahoo.com/
Any assistance would be appreciated.
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 如何将多维PHP数组转换为html表
- html
- html-table
- arrays
- php
- mysql
- 2个回答
- 使用mysqli将多维数组转换为db
- php
- 1个回答
- 如何使用第一列作为键将php多维数组转换为新数组?
- arrays
- php
- 2个回答