public static function json_messages($notices, $errors) { $messages = array_merge($errors, $notices); return json_encode($messages); }