When i use array_diff() functions like; $result = array_diff($array1, $array2);
It turns like; Array( [5] => XXXXXX )
But i dont want to show " Array ( "index here" ) ", only XXXXX part. How can i show only XXXXX? Thanks for every comments...
Obtain the first element that is different -or- NULL
if there is no difference.
list($result) = array_values(array_diff($array1, $array2)) + [NULL];
You can do:
var_dump($result);
See Demo.
To just out put the value you can do:
foreach($result as $value){
echo $value;
}