$newTextArray = array_merge($englishTextArray, $currentTextArray); self::$scope[$scopeName] = $newTextArray; return true; } else { self::$scope[$scopeName] = $englishTextArray; return false; } } public static function more($sentence) { $peaces = explode(" ", $sentence); $return = array(); foreach ($peaces as $textItem) { $return[] = self::_($textItem); } return implode(" ", $return); } public static function toJSON() { $json = '{' . "\n"; foreach (self::$textArray as $key => $value) { $value = strip_tags(str_replace('"', '“', $value)); $json .= '"' . $key . '":"' . $value . '",' . "\n"; } $json .= '}'; return str_replace(",\n}", "\n}", $json); } } //EOF class MText MText::load();