prueba de Diferencias Array Bidireccional - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of prueba de Diferencias Array Bidireccional.php
- <?php
- $array1 = [
- 1=>'dato1',
- 2=>'dato2',
- 3=>'dato3',
- 4=>'dato4',
- ];
- $array2 = [
- 1=>'dato1',
- 2=>'dato2',
- 4=>'dato4',
- 6=>'dato6',
- ];
- $newArray1= array_diff($array1,$array2);
- $newArray2= array_diff($array2,$array1);
- $fullDiffArray= array_merge($newArray1,$newArray2);
- echo '<pre>';
- echo var_dump($newArray1);
- echo var_dump($newArray2);
- echo var_dump($fullDiffArray);
- echo '</pre>';
File Description
- prueba de Diferencias Array Bidireccional
- PHP Code
- 01 Jun-2021
- 440 Bytes
You can Share it:
Latest PHP Pastes