I want to echo html code with dots:
echo '<li>…</li>' . "\n";
But I get
<li>���</li>
How can I solve this problem?
I want to echo html code with dots:
echo '<li>…</li>' . "\n";
But I get
<li>���</li>
How can I solve this problem?
Looks like an encoding problem. You should consider to declare your html in utf8 :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and make sure your file is utf8 encoded.
Because that's unicode:
Add
<meta http-equiv=Content-Type content="text/html; charset=UTF-8"> for HTML 4.01 & below
<meta charset="UTF-8"> for HTML5
Or execute
header("content-type: text/html; charset=UTF-8");
Or of course just do
echo '<li>...</li>' . "\n";
With normal full stops.
Did my answer solve your issue? Please make sure to mark it as accepted to help other people with the same problem.