Quote:
Originally Posted by DustyPorViva
Is there a simple way to compare two arrays like so:
PHP Code:
array1 = {1,1};
array2 = {2,2};
if (array1 == array2)
Without running loops? Ideally I'm looking for a single if check like my example, but my attempts have proven unsuccessful. Is there one of those 'secrets' or is it just not possible?
|
I wonder if you could do something like
PHP Code:
if ((@ array1) == (@ array2)) {
// whatever
}
since @ converts arrays to strings. I know this works for some other stuff, such as "in" or "index".