0
I believe my doubt is simple, I have 2 arrays, one that stores the equipment Macs being consulted ($cmdarr) and another that stores concentrator Macs ($ips), i want to find occurrences of the first $cmdarr array in the second $ips and display only the field [name] of found occurrences.
print_r($cmdarr);
print_r($ips);
Array
(
[0] => Array
(
[0] => 00:1A:3F:6D:3D:C5
[1] => 00:1A:3F:6D:69:49
[2] =>
)
)
Array
(
[0] => Array
(
[.id] => *80003470
[name] => 47460
[service] => pppoe
[caller-id] => 00:1A:3F:64:3C:B5
[address] => 179.189.141.238
[uptime] => 14h57m8s
[encoding] =>
[session-id] => 0x81903470
[limit-bytes-in] => 0
[limit-bytes-out] => 0
[radius] => true
)
One addition I would make is to change the fixed comparison in position
$cmdarr[0]by anotherforeachand in making the comparison.– Don't Panic
Thanks buddy, that’s exactly what I was looking for, settled the question!
– Pedro PILLA