可能重复:
PHP 比较数组
如果两个数组相同但可以以任何方式对元素进行排序,我必须在 php 中比较两个数组并打印输出
IE
$array1=array('a','p','p','l','e');
$array2=array('p','a','e','l');
--- This must return as success because all of the letters in array1 is there in array2
$array1=array('a','p','p','l','e','s');
$array2=array('p','a','e','l');
-- This must return false
$array1=array('a','p','p','l','e','s');
$array1=array('a','p','p','l','e','s');
-- This must return true
请帮忙