- var_dump: documentation ( source)
- array_reverse: documentation ( source)
<?php
$test = array();
$test['a'] = 'first';
$test['d'] = 'second';
$test['c'] = 'third';
$test['e'] = 'penultimate';
$test['b'] = 'last';
foreach(array_reverse($test) as $value) {
var_dump($value);
}