[code]<?php
	function array_walk_recursive ( &$aArray , $sCallbackFunctie , $mUserArguments = null )
	{
		foreach ( $aArray as $sKey => $mValue )
		{
			if ( !is_array ( $mValue ) )
			{
				if ( is_null ( $mUserArguments ) )
				{
					$sCallbackFunctie ( $aArray [ $sKey ] );
				}
				else
				{
					$sCallbackFunctie ( $aArray [ $sKey ] , $mUserArguments );
				}
			}
			else
			{
				if ( is_null ( $mUserArguments ) )
				{
					array_walk_recursive ( $aArray [ $sKey ] , $sCallbackFunctie );
				}
				else
				{
					array_walk_recursive ( $aArray [ $sKey ] , $sCallbackFunctie , $mUserArguments );
				}
			}
		}
	}
?>[/code][b]Een voorbeeld:[/b][code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
	<head>
		<title>
			Array Walk Recursive in PHP 4
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	</head>
	<body>
		<div id="container">
			<?php
				function array_walk_recursive ( &$aArray , $sCallbackFunctie , $mUserArguments = null )
				{
					foreach ( $aArray as $sKey => $mValue )
					{
						if ( !is_array ( $mValue ) )
						{
							if ( is_null ( $mUserArguments ) )
							{
								$sCallbackFunctie ( $aArray [ $sKey ] );
							}
							else
							{
								$sCallbackFunctie ( $aArray [ $sKey ] , $mUserArguments );
							}
						}
						else
						{
							if ( is_null ( $mUserArguments ) )
							{
								array_walk_recursive ( $aArray [ $sKey ] , $sCallbackFunctie );
							}
							else
							{
								array_walk_recursive ( $aArray [ $sKey ] , $sCallbackFunctie , $mUserArguments );
							}
						}
					}
				}
				
				
				
				/*
				 * Voorbeeld van gebruik van de functie
				 */
				
				
				$aMultiDimensionaal = array
				(
					'a' => 'de eerste letter van het alfabet' ,
					'b' => 'een verticaal streepje met een halve cirkel ertegenaan geplakt aan de onderkant' ,
					'c' => array
					(
						'positie' => 3 ,
						'uiterlijk' => 'een iets meer dan halve eivormige cirkel' ,
						'kleur' => 'pimpelpaars' ,
						'overig' => array
						(
							'vaakgebruikt' => 'nee' ,
							'voorbeeldwoord' => 'cabrio'
						)
					) ,
					'd' => 'de vierde letter van het alfabet'
				);
				
				function testFunctie ( &$s )
				{
					$s = ucwords ( $s );
				}
			?>
			<h1>De multidimensionale array v&oacute;&oacute;r het doorlopen ervan:</h1>
			<pre><?php print_r ( $aMultiDimensionaal ); ?></pre>
			
			<?php array_walk_recursive ( $aMultiDimensionaal , 'testFunctie' ); ?>
			
			<h1>De multidimensionale array n&aacute; het doorlopen ervan:</h1>
			<pre><?php print_r ( $aMultiDimensionaal ); ?></pre>
		</div>
	</body>
</html>[/code]