Print array elements recursively

Few minutes ago just got a tweet from phpfour (Emran Hasan) that his company is looking for PHP developers. I just visited the announcement page of their site and clicked the apply online button just for testing. There I saw an array written in PHP to solve it. It looked interesting to me and just wrote code for it. Here it is:

<?php
$array = array(
			array(141,151,161),
			2,
			3,
			array(101, 202, 303),
			"php",
			"5"
		);

/**
 * print array elements recursively
 *
 * @param array
 */
function recurse ($array)
{
	//statements
	foreach ($array as $key => $value)
	{
		# code...
		if( is_array( $value ) )
			recurse( $value );
		else
			echo $key . ' => ' . $value . '<br>';
	}
} // End recurse

recurse($array);

/*
output
0 => 141
1 => 151
2 => 161
1 => 2
2 => 3
0 => 101
1 => 202
2 => 303
4 => php
5 => 5
*/

It’s Fun :D