Hi,
Hallo zusammen ich hab ein Array welches so aussieht:
Array
(
[ordner_id] => 85
)Array
(
[ordner_id] => 86
)
...
Also hast du ein Array, welches als Elemente wiederum Arrays enthaelt.
$array = array_unique($assoc);
print_r($array);Aber in meinem neuen Array $array ist immernoch der selbe Inhalt woran liegt das?
Daran, dass die Elemente deines Arrays absolut *ungleich* sind.
array_unique: "Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same."
Die String-Represaentation deines ersten Elements ist
Array
(
[ordner_id] => 85
)
die deines zweiten
Array
(
[ordner_id] => 86
)
Die sind nicht gleich; also hat array_unique wie gewuenscht funktioniert - es hat alle ungleichen Werte uebrig gelassen.
MfG ChrisB
„This is the author's opinion, not necessarily that of Starbucks.“