I've got an associative array (I call 'em hashes) that works well for most of my purposes. However when there's only one key/value pair I want to print the name of the key. How do i print the string used as the key?
If I were cycling through mulitple pairs, I would just use
foreach($hash as $key => $value){
print "The key is $key!";
}
But there must be a more efficient / prettier way of getting to the key when there's only one pair.