I want to check if two arrays are identical. Normally everybody just would use something like this:
if($arrayA == $arrayB){
//do something...
}
But my question is, how can I check, if the array contains the same values?
For example, array A looks like:
array(2) {
[0]=>
array(6) {
["price"]=>
string(5) "50"
["shop"]=>
string(4) "9509"
}
[1]=>
array(6) {
["price"]=>
string(5) "5"
["shop"]=>
string(4) "9509"
}
}
and array B look like:
array(2) {
[0]=>
array(6) {
["price"]=>
string(5) "5"
["shop"]=>
string(4) "9509"
}
[1]=>
array(6) {
["price"]=>
string(5) "50"
["shop"]=>
string(4) "9509"
}
}
As you can see, only the inner arrays have swaped (5 & 50). But I want to get true. I just want to know if both arrays contain the same informations. Not, if they are completely identical!
How can I check this?
Greetings and Thank You!