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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:23:34+00:00 2026-05-28T18:23:34+00:00

The data was inserted into the database after being escaped as follows: $caller=htmlentities($formVarsI[‘caller’], ENT_QUOTES,

  • 0

The data was inserted into the database after being escaped as follows:

$caller=htmlentities($formVarsI['caller'], ENT_QUOTES, "UTF-8");

Some of the $caller’s have single quotes e.g. O’Connor and these then look like O'Connor in the database.

I am now trying to extract the data using a REST api and below is my php:

$sql = "SELECT caller FROM tbl_calls ";
try {
    $db = getConnection();
    $stmt = $db->query($sql);  
    $calls= $stmt->fetchAll(PDO::FETCH_OBJ);
    $db = null;
    echo json_encode($calls);
    }

My question is how to html_entity_decode on $caller so as to remove the

'

for each caller where it applies. Note there are approx. 10,000 entries in the db.

  • 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-28T18:23:34+00:00Added an answer on May 28, 2026 at 6:23 pm

    I think you should specify the quotes parameter.

    html_entity_decode('O'Connor', ENT_QUOTES);
    // output: O'Connor
    

    By default it’s ENT_COMPACT and it just convert double quotes, not single.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a thousands of data parsed from huge XML to be inserted into
I want to associate additional data with each QTableWidgetItem inserted into the table, in
I have a table into which new data is frequently inserted. I need to
I inserted data in a MySQL database which includes Arabic script. While the output
Data from another system is replicated into a SQL Server 2005 database in real-time
I have form data that I insert into a database when the user clicks
I have a PHP script that is inserting a record into a database after
I want to reduce the ms access database file size after deleting data. I
I have a problem with inserting data into SQLite database using QSqlTableModel. The table
We have a system that allows users interfacing data into the database to set

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.