I have a two array's like below:
$arr = ["sample","sample2","sample3"];
$arr1 = ["sample3","sample2","sample"];
If you notice the above two arrays having same values but in different positions.
I want to check if these two arrays are qual or not ?
I have a below solution but looking for best solution.
var_dump((count($arr) == count($arr1) && !array_diff($arr, $arr1)));
Please help me with accurate solutions. Thanks !