I have a nested array with the information I need.
array(66) {
[0]=>
array(2) {
["key"]=>
string(1) "9"
["value"]=>
string(1) "9"
}
[1]=>
array(2) {
["key"]=>
string(3) "104"
["value"]=>
string(1) "3"
}
[2]=>
array(2) {
["key"]=>
string(3) "105"
["value"]=>
string(1) "1"
}
...
However, this format is not terribly useful. More useful would be
[9]=>9
[104]=>3
[105]=>1
and so on.
Unfortunately my attempt
foreach ($arrayname as $key => $value) {
$i= ((int) $value);
$hashmap[$i] = ($value["value"]);
}
to date merely records the final value, without the associated key array(1) { [1]=> string(3) "360" }. Note: it doesn't matter if the key is stored as string or int!