Return to Snippet

Revision: 57088
at May 14, 2012 19:00 by pruntrut


Initial Code
$array = array( array('A' => "Hello", 'B' => "World"),
                array('A' => "Goodnight", 'B' => "Vienna")
              );

function myFunc(&$item, $key) {
    $item = mysql_real_escape_string($item);
}

array_walk_recursive($array,'myFunc');

var_dump($array);

Initial URL
http://stackoverflow.com/questions/4085623/array-map-for-multidimensional-arrays

Initial Description
Using array_map() on multidimensional arrays

Initial Title
Using array_map() on multidimensional arrays

Initial Tags
php, array

Initial Language
PHP