I\'ve got an associative array in PHP and want to select a random key/value pair out of it. Here\'s what I have so far:
Initialize.
$locations = arra
your push is wrong
$locations[$location_id] = $location_name;
it should be
so, there is nothing about selecting random element in your question. always debug your code, just to see if you have proper data before using it