$arr=Array('1','2','3','4'); $numItems = count($arr); $i = 0; foreach(array_reverse($arr) as $key=>$value) { echo $value; }