Revision: 64036
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 29, 2013 17:13 by noganno
Initial Code
function find_in_arr($key, $arr) { foreach ($arr as $k=>$val) { if($k == $key) { return $val; } if(is_array($val)) { $result = find_in_arr($key, $val); if($result != false) { return $result; } } } return false; } $arr = array( 'name' => 'Php Master', 'subject' => 'Php', 'type' => 'Articles', 'items' => array( 'one' => 'Iteration', 'two' => 'Recursion', 'methods' => array( 'factorial' => 'Recursion', 'fibonacci' => 'Recursion', ), ), 'parent' => 'Sitepoint', ); var_dump(find_in_arr('fibonacci', $arr));
Initial URL
http://phpmaster.com/understanding-recursion/
Initial Description
поиÑк Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð² многомерном маÑÑиве
Initial Title
РекурÑÐ¸Ñ Ð² php
Initial Tags
php
Initial Language
PHP