fork download
  1. <?php
  2. $_array = array( 'value1' , 'value2' , 'value3' );
  3.  
  4.  
  5. $arrays = array( 'value1' , 'value4' , 'value3' );
  6. $result = array_diff_assoc( $arrays , $_array );
  7. print_r( $result );
  8.  
  9. $arrays = array( 'value1' , 'value3' , 'value2' );
  10. $result = array_diff_assoc( $arrays , $_array );
  11. print_r( $result );
  12.  
  13. $arrays = array( 'value1' , 'value2' , 'value3' );
  14. $result = array_diff_assoc( $arrays , $_array );
  15. print_r( $result );
  16.  
  17. // your code goes here
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [1] => value4
)
Array
(
    [1] => value3
    [2] => value2
)
Array
(
)