Php Spanish Language Character Dont Appear Correct
- Forums
- PHP
- Php Spanish Language Character Dont Appear Correct
This Page Contains information about Php Spanish Language Character Dont Appear Correct By wallpaperama in category PHP with 2 Replies. [1203], Last Updated: Sat May 18, 2024
wallpaperama
Mon Nov 10, 2008
2 Comments
1444 Visits
htmlentities()
if you are reading my post here today its probably because you have a website with spanish language characters like
example:
Iniciar Sesi�n should look like: Iniciar Sesión
Contrase�a should look like Contraseña
as you can see, Contraseña should looke like this: Contraseña but instead it looks like this Contrase�a on my firefox browser. so how do you fix this..
well, to fix this in php its very easy. all you have to do is use the htmlentities() function when you declare your variables.
for example, i have a language file and the login variable is:
$lang['password'] = htmlentities('Contraseña');
thats it. just make sure you use htmlentities to display them. sometimes this is helpful when you are also getting information language like this from your database like mysql. this problems can be resolve with this php function. that way you wont have any trouble displaying it the correct way. thats why php is the worlds best web programming language because you can solve problem like this with foreing letters and number with accent like the latin keys
hope this helps
https://www.wallpaperama.com/forums/php-spanish-language-character-dont-appear-correct-t6741.html