class mmhclass_core_functions
{
function clean_array($array)
{
if (is_array($array) == true) {
$array_keys = array_keys($array);
for ($i = 0; $i < count($array_keys); $i++) {
$key = $array_keys[$i];
$value = $array[$key];
$new_key = strtolower($key);
unset($array[$key]);
if (is_array($value) == true) {
$array[$new_key] = $this->clean_array($value);
} elseif ($this->is_null($value) == NULL) {
$array[$new_key] = $this->clean_value($value);
}
}
}
return $array;
}
function clean_value($value, $value_decode = false)
{
if ($value_decode == true) { // <-- Decode cleaned string
$value = html_entity_decode($value);
$value = strtr($value, array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_COMPAT)));
$value = str_replace("
", "\n", $value);
} else {
$value = str_replace("\\\"", "\"", $value); // <-- Because stripslashes() removes Windows directory slashes
$value = str_replace("\\'", "'", $value); // <-- ^
$value = str_replace("\\\\", "\\", $value); // ", "-->" , $value);
$value = preg_replace("/