Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.



Add comment:
Name:
Email:
Comment: *
(Use BBcode - No HTML)


You MUST answer this simple math equation - to prevent spammers: 1 + 2 =  


How can I remove strange characters from a string in php?

Last updated: 09/06/2010

Sometimes data you get in html / tabbed files comes encoded in the wrong format, and it displays something like:

®

and other characters.  Before you insert this data into a database, or store it, use this function to clean it up:

utf8_decode();

here's the full page that documents the function:

http://php.net/manual/en/function.utf8-decode.php

 





Powered by KnowledgebasePublisher 1.1
Superb Internet
Content provided by Roberts WebForge, Inc.