public static function tokenize($string, $delimiter)
    {
        $result = '';
        $token = strtok($string, $delimiter);
        $result .= $token;

        while ($token) {
            $token = strtok($delimiter);
            $result .= ',' . $token;
        }

        return chop($result, ',');
    }