Why doesnt this work
Posted: Fri Apr 22, 2016 3:05 am
Code: Select all
<?php
$test=array('A','B','C','D','E','F');
$key=array('A','C');
print_r($test);
echo"<br>";
$temp = array_diff( [$test], [$key] );
$a = implode("|", $temp);
echo $a;
?>If i set it to $temp it doesnt work although I thought array_diff should return an array ($test where the values in $key are removed).
Why is this not working?
Thanks