I currently use htmlentities to insert data into MySQL. I was just wondering if there is a better, or more efficient, way — one that would take up less space.
Would this affect searching my database?
Would utf8_general_ci be OK to use for all languages?
Which is best: htmlspecialchars or htmlentities?
Ideally, you should store the raw data in the database (utf8_general_ci is fine), and only use functions like htmlentities at the very last minute before outputting the information to the browser.