please help me figure out the error to find the value by key. As the value is printed when using a string but not a variable with the same value. Thanks in advance
Code:
print_r($ESSID_data);
print_r($ESSID_data['criticalboot']);
print_r($myssid);
print_r($ESSID_data[$myssid]);
output:
Array ( [criticalboot] => Array ( [0] => CCMP [1] => PSK ) )
Array ( [0] => CCMP [1] => PSK )
criticalboot
Undefined index: criticalboot
print_rusevar_dumpand check again.$myssiddeclared? Maybe it contains a space.$ESSID_data = array("criticalboot" => array("CCMP", "PSK"));and$myssid = "criticalboot";and it works just fine.