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...
When i use array_diff() functions like; 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... |
|||
add comment |
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
Obtain the first element that is different -or-
You can do:
See Demo. To just out put the value you can do:
|
|||||||||||||
|
array_diff
returns an array containing all the entries from array1 that are not present in any of the other arrays. – Valera Leontyev Dec 13 '12 at 20:21