If i have an array with hundreds of random ids (having values too) like
(3=>23,2=>34,17=>670,5=>67...)
how can i get an output like following via a loop
ID: 3 has a value= 23
ID: 2 has a value= 34
ID: 17 has a value= 670
ID: 5 has a value= 67
I can reference the values by their IDs like
echo $myArray['3'];
but what if don't know in advance that what the next ID is? I mean how can i reference the IDs automatically with a loop? Is it even possible to code the following pseudo code in php?
myArray's first location's ID has value = $myArray[$myArray's first location item]
myArray's 2nd location's ID has value = $myArray[$myArray's 2nd location item]
Need help plz...