The line: `eval($var . '="' . str_replace('"', '\"', $itm) . '";');` Should be: `$itm = rtrim($itm,"\\"); eval($var . '="' . str_replace('"', '\"', $itm) . '";');` Because if $itm has a \ at the end of the value, it will trigger a ParseError.