n8w Posted July 29, 2009 Share Posted July 29, 2009 what is the best way to store data in my database if people might be posting info in multiple languages (English, Spanish, etc)? should my in and out fucntion look something like this? //in- putting data into the database function bad_chars($text){ $text = trim($text); $text = utf8_encode ($text) $text = mysql_real_escape_string($text); return $text; } //out - pulling data out of the database function converttohtml($text){ $text = stripslashes($text); $text = utf8_decode ($text) return $text; } Link to comment https://forums.phpfreaks.com/topic/168049-dealing-with-multiple-languages/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.