- print_r: documentation ( source)
<?php
//Create an array
$array=array('a','b','c','d','e','f','g');
//Loop over the array by reference
foreach($array as &$a){
}
//Loop again over the array
foreach($array as $a){
}
//Print the array
print_r($array);