我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

我想用PHP找到两行之间的区别[关闭]

I have two rows fetched from database... The table is something like

id | values
------------
1  | speaker
2  | modem
3  | pendrive

and another table is something like

id | values
------------
1  | speaker
2  | pendrive

I want to see like

no.| values
------------
1  | modem

You can use php array_diff, it will give you exactly what you want:
This is how it works:

$newArray= array_diff($array1, $array2);

Here is a working DEMO

近期文章

  • 运算符之间的php查询[关闭]
  • php中的响应头[关闭]
  • 以下数据的排序。 [关闭]
  • 无法执行sql查询[关闭]
  • preg_match for string - string [关闭]
  • 关于“联系我们”页面的问题[关闭]
  • 在php中循环增加5
  • 使用PHP将SND / AU转换为mp3 [关闭]
  • 如何在PHP中解析此JSON?
  • msqli_query中的$ _SESSION变量[关闭]
  • 注意:未定义的索引:$ username [duplicate]
  • 这个Php脚本有什么问题? [关闭]
  • 在AJAX中没有接收JSON数据
  • 在symfony中将php数组转换为json格式[关闭]
  • too long
  • 获取警告“已弃用:函数ereg()已弃用”[重复]
  • 如何从字符串“+11.00”返回正则表达式php值“+11”[重复]
  • 在sql数据库中匹配月份和年份
  • PHP Mysqli查询更新无法使用变量
  • 如何在后台连续运行ajax请求?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华