php合并数组~按照某一列的值
如这样两个数组:
A=[[0] =>[[time] => 2015-11-01,
[draw] => 900],
[1] =>[[time] => 2015-11-02,
[draw] => 1512],
[2] =>[[time] => 2015-11-05,
[draw] => 1600]];
B=[[0] =>[[time] => 2015-11-01,
[data] => 90],
[1] =>[[time] => 2015-11-03,
[data] => 152],
[2] =>[[time] => 2015-11-05,
[data] => 100]];
我要把AB数组合并成一个数组,按照[time]相同的合并在一起,达到这样一个效果:
C=[[0] =>[[time] => 2015-11-01,
[draw] => 900, [data] => 90],
[1] =>[[time] => 2015-11-02,
[draw] => 1512],
[2] =>[[time] => 2015-11-03,
[data] => 152],
[3] =>[[time] => 2015-11-05,
[draw] => 1300, [data] => 100]];
类似数据库的"full join", , 这个有办法实现吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)