I have some difficulties comparing 2 arrays with PHP/Laravel. I want to check if values of those arrays are the same.
For example:
$ar1 = ["asd", "dsa", "aaa"];
$ar2 = ["dsa", "asd"];
Those are not the same, because there is "aaa", but if there is not "aaa" it should say that they have same values.
Any ideas how to do it?
I tried with array_intersect and in_array, but nothing works as expected.