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

The Archive Base Latest Questions

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

I am trying to replace £ with £ and it did not work. I’ve

  • 0

I am trying to replace £ with £ and it did not work.

I’ve tried:

echo str_replace("£", "£", "£3 Discount Discount");

I have also tried html_entity_decode which also did not work.

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

    This is an issue with trying to display UTF-8–encoded data as non–UTF-8. You need to make sure that all character encodings are consistent, and if not then you’re converting between them appropriately. The easiest way is to ensure that absolutely everything is in UTF-8. This includes:

    • The data that’s saved in the database (MySQL’s character set / collation)
    • The client connection to the database (Using SET NAMES UTF-8)
    • The output to the browser (header('Content-Type: text/html; charset=utf-8');)
    • The PHP script containing the code (yes, this sometimes has an impact)

    I would first suggest checking that there isn’t any mojibake in your database (e.g. using phpMyAdmin or command-line client), before checking the character sets above. If you find that the database actually contains £, then I would suggest applying the same logic above to any input mechanism to the database (including character encoding of HTML forms).

    (Note: I’ve assumed MySQL throughout this answer.)

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

Sidebar

Related Questions

At the company that I work we have a successful software product that did
I have been trying to make a updateable grid.Which means i show an icon
I'm trying (still) to get ajaxful-rating to work with my rails installation. I did
I'm trying to replace everything between 2 tags, but I'm not able to build
I am trying to deconstruct why this does not work in my (g)Vim console:
I have been trying to get this code to work for a while now
When trying to replace the content of an XML file in C#.NET with a
I'm trying to replace each , in the current file by a new line:
I'm trying to replace the programs that run from my startup directory with a
I'm trying to replace every multiline import inside a Python source file.. So, the

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.