1.PHP 简写代码
2:输出对比1
Array( [mobile] => 13540077850 [email] => 122195562@qq.com [realname] => 你好 [sex] => 2)
Array( [mobile] => 13540077850 [email] => 122195562@qq.com [realname] => 你好 [sex] => 2)
Array()
两数组相当
3:输出对比2
Array ( [mobile] => 13540077850 [email] => 122195562@qq.com [realname] => 你好 [sex] => 2 )
Array ( [mobile] => 13540077850 [email] => 122195562@qq.com [realname] => 你好 [sex] => 1 )
Array ( [sex] => 1 )
想数组不相当
array_diff 当两个数据有不同的地方时候 echo 一下array_diff 处理过的数据会列出不同的,当量数据相等时会echo 出一个空数组来....
所以可以通过empty()判断....