miracle_potential Posted May 5, 2008 Share Posted May 5, 2008 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 Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/ Share on other sites More sharing options...
effigy Posted May 5, 2008 Share Posted May 5, 2008 What encodings are you using in your database and in the displaying page? Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-533482 Share on other sites More sharing options...
Rohan Shenoy Posted May 5, 2008 Share Posted May 5, 2008 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. Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-533498 Share on other sites More sharing options...
miracle_potential Posted May 5, 2008 Author Share Posted May 5, 2008 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! 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 Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-533699 Share on other sites More sharing options...
effigy Posted May 5, 2008 Share Posted May 5, 2008 What character set is in your meta tag? Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-533715 Share on other sites More sharing options...
miracle_potential Posted May 6, 2008 Author Share Posted May 6, 2008 Its just a standard UTF-8 encoding, Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-534196 Share on other sites More sharing options...
miracle_potential Posted May 6, 2008 Author Share Posted May 6, 2008 Dont worry updated my database, lots of records but the jobs done now Thanks guys Link to comment https://forums.phpfreaks.com/topic/104208-solved-pound-sign-problems-in-my-database-s/#findComment-534225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.