Multiple Operations in PHP
array_intersectarray_diffarray_intersect_assocarray_intersect_keyarray_diff_assocarray_diff_keyЗадание 1
Given arrays:
php<?php
$arr1 = [1, 2, 3, 4, 5];
$arr2 = [3, 4, 5, 6, 7];
?>
Write to a new array the elements that are present in both arrays.
Задание 2
Given arrays:
php<?php
$arr1 = [1, 2, 3, 4, 5];
$arr2 = [3, 4, 5, 6, 7];
?>
Write to a new array the elements that are not present in both arrays simultaneously.