I'm looping through an associative array with a foreach. I'd like to be able to check if the key value pair being handled is the last so I can give it special treatment. Any ideas how I can do this the best way?
foreach ($kvarr as $key => $value){
// I'd like to be able to check here if this key value pair is the last
// so I can give it special treatment
}