Jump to content

meta-charset


Alfraganus

Recommended Posts

my datas are not being shown properly, but I have declared charset=utf-8, i dont know what is wrong with it, but charset is not wroking

<?php
header('Content-Type: text/html; charset=UTF-8');
?>

 

<!DOCTYPE html>
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" media="all" />
</head>
<link rel="stylesheet" type="text/css" href="style.css">
<body>
<div id="header">ajshcoljwq qwpdjpqwkdqokdwpqodk'pqw </div>
<div id="sidebar"> </div>
<center>
<div id="content">
<?php
$con=new mysqli("localhost","root","", "testdb");
$sql="SELECT * FROM cms";
$run=mysqli_query($con, $sql);
while($row=mysqli_fetch_array($run)) {
$title=$row['title'];
$body=$row['body'];
}
echo "
<h1> $title</h1
<p>$body</p>
";
?>
<div id="footer">
</center>
</body>
</html>
Edited by Alfraganus
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...