Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:01:22+00:00 2026-06-04T05:01:22+00:00

I am using Code Ignitor for my site. The problem is in the same

  • 0

I am using Code Ignitor for my site. The problem is in the same server the function htmlspecialchars_decode($str); is working but not when I use with CI.

This is my code in controller’s function:

$meta_d = $this->site_model->lyrics_meta_desc();
$data['meta_desc'] = htmlspecialchars_decode($meta_d);

And this in my view:

<meta name="description" content="<?php echo character_limiter($meta_desc, 150);?>" />

Is there anything I am missing. Or some thing else is to be done for CI. Please suggest.By the way I have loaded text helper for the use of character_limiter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:01:23+00:00Added an answer on June 4, 2026 at 5:01 am

    The given code works as it is intended.

    However if you want to get readable text from the Html entities such as &#73;&#39;&#118;&#101;&#32;&#119;&#97;&#108; . You need to call utf8_encode() after htmlspecialchars_decode() .I would advice you to use html_entity_decode() as well , since it includes all html entities .

    so,

    $meta_d = $this->site_model->lyrics_meta_desc();
    $data['meta_desc'] = utf8_encode(html_entity_decode($meta_d));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am planning a new website with codeigniter using wordpress. this site will contain
CodeIgniter is brilliant but I'm using it to develop a site where users need
I have enabled google Minify in code igniter using this library on our website.
I am using GoogleAnalytics API library on my Codeigniter site, but i didn't find
I'm using CodeIgniter next to a Wordpress install. So, I've got this site that
I am building a multi-language site using codeigniter I have this language file $lang['prot_home_1']
I have a site using CodeIgniter that is almost complete now. My problem is
I am building a site using code igniter. I am developing a custom product
been recoding my site using code igniter. I am having some quirks with my
I am recoding my site using CodeIgniter. This is my first time using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.