Exemplo n.º 1
0
 /**
  * scan_array private method
  * @param  string $string string to search
  * @param  array $array   array to check
  * @return mixed          found element / FALSE on failure
  */
 private static function scan_array($string, $array)
 {
     list($key, $rest) = preg_split('/[[\\]]/', $string, 2, PREG_SPLIT_NO_EMPTY);
     if ($key && $rest) {
         return @cs_form::scan_array($rest, $array[$key]);
     } elseif ($key) {
         return $array[$key];
     } else {
         return FALSE;
     }
 }