foreach.php array printed using foreach php source code $array = array( 1, 2, 3, 4, 5); foreach( $array as $value ) { echo "Value is $value \n"; } Value is 1 Value is 2 Value is 3 Value is 4 Value is 5