<?php $items = array ( 1 , 2 , 3 ); foreach ( $items as & $item ) { // do anything } foreach ( $items as $item ) { echo $item ; }