<?php $multidim_array = ['a' => [' \one ', ['b' => 'two\\', [['c' => 'thr\ee']]]]]; $func = 'strpos'; if (function_exists($func)) { $more = true; $param2 = 'o'; array_walk_recursive($multidim_array, function(&$v)use($func, $more, $param2) { if ($more) { $v = $func($v, $param2); } else { $v = $func($v); } }); var_export($multidim_array); } else { echo "um... I'm not calling $func"; }
You have javascript disabled. You will not be able to edit any code.