As already mentioned, array_unique() could be used, but only when dealing with simple data. The objects are not so simple to handle.
I'm still developing applications for Windows 7 of course, but I'm wondering if there's a quick and easy way (read: WPF style or Windows Library) to emulate this style. I've done some window chrome styling in the past, but getting it to look and behave just right is really tricky.
Does anyone know if there are existing templates or libraries to add a "Modern UI" look and feel to my WPF applications?
When php tries to merge the arrays, it tries to compare the values of the array members. If a member is an object, it cannot get its value and uses the spl hash instead. Read more about spl_object_hash here.
same class and if one of them is not a reference to the other one - you will end up having two objects, no matter the value of their properties.Simply told if you have two objects, instances of the very same class and if one of them is not a reference to the other one - you will end up having two objects, no matter the value of their properties.
To be sure that you don't have any duplicates within the merged array, Imho you should handle the case on your own.
To be sure that you don't have any duplicates within the merged array, Imho you should handle the case on your own.
Also if you are going to merge multidimensional arrays, consider using array_merge_recursive() over array_merge().