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 6168901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:46:01+00:00 2026-05-23T22:46:01+00:00

My data has many HTML entities in it ( • …etc) including ' .

  • 0

My data has many HTML entities in it (• …etc) including '. I just want to convert it to its character equivalent.

I assumed htmlspecialchars_decode() would work, but – no luck. Thoughts?

I tried this:

echo htmlspecialchars_decode('They're here.');

But it returns: They're here.

Edit:

I’ve also tried html_entity_decode(), but it doesn’t seem to work:

echo html_entity_decode('They're here.')

also returns: They're here.

  • 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-05-23T22:46:01+00:00Added an answer on May 23, 2026 at 10:46 pm

    Since ' is not part of HTML 4.01, it’s not converted to ' by default.

    In PHP 5.4.0, extra flags were introduced to handle different languages, each of which includes ' as an entity.

    This means you can do something like this:

    echo html_entity_decode('They're here.', ENT_QUOTES | ENT_HTML5);
    

    You will need both ENT_QUOTES (convert single and double quotes) and ENT_HTML5 (or any language flag other than ENT_HTML401, so choose the most appropriate to your situation).

    Prior to PHP 5.4.0, you’ll need to use str_replace:

    echo str_replace(''', "'", 'They're here.');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Perl script that has (skipping many irrelevant lines) use HTML::Entities; my
I have an application that has many threads processing data. As part of this
I'm migrating data from a legacy database that has many tables with primary keys
I have html encoded strings in a database, but many of the character entities
I'm reading some data that has already been converted to html style υ code.
I have two data models: Writer.AttributValeur and Writer.Produit . Writer.Produit has HasMany / BelongsTo
Suppose your JSON data has a key like @id ... with a non-alphanum character...
How to find the text field data has \n in mysql? for ex :
I wish to make sure that my data has a constraint the following check
I have data of program usage in excel file, the data has date and

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.