I have been fighting with this all day and would like another set of eyes to maybe give me some insight. I'm not sure I am even approaching this the correct way. I have two arrays but these arrays have different number lists. I'm building an app with Laravel.
$naflr = array(
0 => "NA"
1 => "A2"
2 => "A2"
3 => "A1"
4 => "A1"
5 => "A1"
...
49 =>"A3"
)
$fuzifikasi = array(
0 => "A2"
1 => "A1"
2 => "A4"
3 => "A1"
4 => "A1"
5 => "A1"
...
48 => "A4"
)
How do I filter the value array from the NAFLR array with FUZIFIKASI
, I hope the result is like this
$resul = array(
[na] = array(
0 => "A2"
)
[A2] = array(
0 = > "A1"
1 => "A4"
)
....
)