Jump to content

dealing with multiple languages


n8w

Recommended Posts

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

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.