时间:2021-07-01 10:21:17 帮助过:73人阅读
<?php $a = array( "max_allow_dialogs", "livechat_server_ip", "livechat_service_time", "abort_zh_cn", "abort_zh_tw", "abort_en_usa", "welcome_zh_cn", "welcome_zh_tw", "welcome_en_usa", "timeout_zh_cn", "timeout_zh_tw", "timeout_en_usa", "absence_zh_cn", "absence_zh_tw", "absence_en_usa" ); $b = array( "max_allow_dialogs", "livechat_server_ip", "livechat_service_time", "abort_zh_cn", "abort_zh_tw", "abort_en_usa", "welcome_zh_cn", "welcome_zh_tw", "welcome_en_usa", "timeout_zh_cn", "timeout_zh_tw", "timeout_en_usa", ); $c = array_merge(array_diff($a,$b),array_diff($b,$a)); print_r($c); ?>
结果:
Array ( [0] => absence_zh_cn [1] => absence_zh_tw [2] => absence_en_usa )
相关推荐:
PHP 数组排序方法总结
PHP 数组和字符串之间相互转换的方法
php 数组函数current()定义与用法
以上就是详解PHP实现查找两个数组中不同元素的方法的详细内容,更多请关注Gxl网其它相关文章!