I have an array of WellKnownMACs which has the MACs as a key and the device name as the value as follows:
$wellKnownMACs = array (
‘00:cd:00:12:00:00’ => ‘Wii’,
‘00:ab:16:34:00:00’ => ‘Gateway’,
…
);
When I vardump it, everything looks good.
vardump ($wellKnownMACs[’'00:cd:00:12:00:00"]); works, but
$i=“00:cd:00:12:00:00”
vardump ($wellKnownMACs[’$i’]); always returns NULL. Am I missing something obvious?
My application reads MACs from router log files and substitutes the device name for well known devices.