Jump to content

returning pound sign from mysql databse


Gooner

Recommended Posts

Hi

I have a field in a MySQL database that reads:  "abcde:1 bag - £" (without the quotes)

I am returning this value (which is stored as text in the database) as follows:

I split the result into an array, using the : as the delimiter.

So, $array[0] = "abcde" and $array[1] = "1 bag - £"

The problem I have is that when I echo the $array[1] value i get the following displayed:

1 Bag - £

Where does this  come from, and how can I not display it?

Thanks for your help.
Link to comment
Share on other sites

The page is using "charset=iso-8859-1".

The str_replace does solve the problem (although I can't actually type the Â, I have to copy & paste it).

The field is set to "text" in the database.

Any other suggestions, as I'd rather not use the str_replace option.

Thanks
Link to comment
Share on other sites

Thanks for your replies.

I ahve checked the charset on the table using phpMyAdmin and it states it's using English - iso-8859-1.

I'm not sure what you mean about the word processing issues. This database has never been near one and none of the values come from word (they were actually manually entered into the database).
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.