<?php $input = [ 1 => ['Hello' => 'this is a nested hello!'], 'Hello' => 'this is a root hello!']; function getValue($root, $i = null) { $_t = isset($root[$i]) ? $root[$i] : $root; return isset($_t['Hello']) ? $_t['Hello'] : ''; } echo getValue($input); echo getValue($input, 1); echo getValue($input, 2);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`