0

My understanding of array_diff(), is that the following code must return array($a[1]).

This is not the behavior. Instead, an array() returned.

What I understand wrong?

<?php
$a = array(
    array('contract' => '5/1-4-2019'),
    array('contract' => '1/1-4-2019'));
$b = array($a[0]);
var_dump(array_diff($a, $b));
?>
Chameleon
  • 1,804
  • 2
  • 15
  • 21

0 Answers0