The question is that there are two arrays with different numbers of elements and it is necessary to check which elements were not found in $ array2 and output them. Example:

$array1 = array (Вода Легенда 19 л.qq, Вода Легенда 10 л. (пакетqq), Стаканодержатель, Переходник для диспенсера ); $array2 = array (Стаканодержатель, Переходник для диспенсера ); 

// the result should be Water Legend 19 l. qq and Water Legend 10 l. (package qq) not found $array2 may be empty, equal to, but cannot be more than $array1 ? Thank you in advance.

    1 answer 1

    Use the array_diff function ( http://www.php.su/array_diff () )

     $result = array_diff ($array1, $array2); print_r($result);