public function get_typed_array($name, $mode = null, $type = null, $default = null, $specialchars = false, $preg_replace = array(), $allowed_html_tags = '', $save = false)
{
$arr = $this->get_array($name, $mode, $default);
$array_keys = array_keys($arr);
foreach ($array_keys as $key) {
switch ($type) {
case 'bool':
$arr[$key] = (bool) $arr[$key];
break;
case 'int':
$arr[$key] = (int) $arr[$key];
break;
case 'float':
$arr[$key] = (double) $arr[$key];
break;
case 'string':
$arr[$key] = (string) $arr[$key];
break;
case 'array':
$arr[$key] = (array) $arr[$key];
break;
case 'title':
$arr[$key] = (string) $this->_get_title($arr[$key], $specialchars, $preg_replace);
break;
case 'textarea':
$arr[$key] = (string) $this->_get_textarea($arr[$key], $allowed_html_tags, $save);
break;
case 'editor':
$arr[$key] = (string) $this->_get_editor($arr[$key], $allowed_html_tags);
}
}
return $arr;
}