let’s say i have 2 array.
array1:
value = 2
value = 1
value = 3
array2:
value = 1
value = 2
value = 3
value = 4
i want to re arrange array1 to have the same sorting has array2 and remove the values that are not found in array2. I want to follow the sorting of array2 i dont know if there is an existing function for this if there is kindly tell me. thank you.
$array_intersectwill then have: