Jump to content

[SOLVED] Pound sign problems in my database =S


Recommended Posts

Hey guys,

 

Having a spot of trouble, is there anyway I can get ALL of the £ and only the £ signs out of my database because there echoing as a non standard character (The annoying little box) Because I can just echo a £ sign in my while loop

 

Thanks guys :)

Use htmlentities() function while putting it into the database.

$string="I have £ 10 in my Paypal account";
$string=htmlentities($string);
//above will convert the string into "I have £ 10 in my Paypal account" and then use query insert it  into your database.

Well basically the other day I posted a topic asking about getting an excel sheet into my database and got it all working and stuff great!  ;D

 

But now lol theres annoying squares when I echo the daabase results where the pound signs should be I was just wondering if something like preg_replace would work.

 

But I thought it might just be easier to delete all the non alphanumerical characters from the database.

 

I'm not sure about what encoding I'm using I know the database has something about Latin something or other but the page as far as I know is a standard PHP page lol. Sorry  ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.