duangouyan3328 2010-11-04 21:47
浏览 63
已采纳

php ::一个函数做array_unique(array_merge($ a,$ b));

I am aware that I can use array_unique(array_merge($a,$b));

to merge two arrays and then remove any duplicates,

but,

is there an individual function that will do this for me?

(I know I could write one myself that just calls these, but I am just wondering).

  • 写回答

5条回答 默认 最新

  • dopmgo4707 2010-11-04 21:52
    关注

    There is no such function. Programming languages in general give you a certain set of tools (functions) and you can then combine them to get the results you want.

    There really is no point in creating a new function for every use case there is, unless it is a very common use case - and yours does not seem to be one.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题