Forum Moderators: coopster
I have an array that prints out like this:
Array (
[1] => 1956.0688881835
[2] => 1998.9853287785
[3] => 1839.565611694
[5] => 1900.3659881069
[25] => 59.368599722285
[37] => 197.68427334405
)
The index represents a recordset ID
You can I access just '37' for example?
thank you
thanks for your help again. Here's what I have,
As the mySQL select statement loops through a query looking for locations, this line here populates the array:
$nearest_location[$location_id] = $location_distance;
$location_id is the record ID, that I have put into the key.
I want to pull out just key so that I can use it later in the script.
I know how to do something like:
echo $nearest_location[]; or
echo $nearest_location[3]; which will show $location_distance, but I want to echo just the key which is the value stored by $location_id
thanks again