if (is_array($input)) 
        {
            $decoded = array();
            foreach ($input as $index => $char)
            {