0

Ok, so this is driving me nuts, because I can't see why it's happening.
Simple code:

<html>
<head>
<meta name='author' content='TonyG' />
<meta name='description' content='' />
<meta name='keywords' content='' />
<title></title>
<link rel='stylesheet' type='text/css' href='css/style.css' media='all'/>
<link rel='shortcut icon' href='favicon.ico'>


</head>
<body><div class='container'>
<div class='header'></div>
<div class='content'>
<div class='navi'>

<ul class='item'>
<li><a href=''>Birthday</a></li>
<li><a href=''>New Baby</a></li>
<li><a href=''>Anniversary</a></li>
<li><a href=''>Wedding</a></li>
<li><a href=''>Driving Test</a></li>
<li><a href=''>Moving</a></li>
<li><a href=''>New Job</a></li>
<li><a href=''>Retirement</a></li>
<li><a href=''>Good Luck</a></li>
<li><a href=''>Engagement</a></li>
</ul>

</div>
</div>
</div>
<?php

include('php/footer.php');
?>
</body>
</html>

Now if I replace the unordered list with an include of the same list,
i.e

<?php
include('nav.html');
?>

I get this strange symbol above it



when I run it in xampp
It only happens on the one include, not on the footer one, Any clues?

7
Contributors
7
Replies
11
Views
4 Years
Discussion Span
Last Post by TonyG_cyprus
-1

Works fine for me - are you sure you just have the navigation in your external file, like this?

<div class='navi'>

<ul class='item'>
<li><a href=''>Birthday</a></li>
<li><a href=''>New Baby</a></li>
<li><a href=''>Anniversary</a></li>
<li><a href=''>Wedding</a></li>
<li><a href=''>Driving Test</a></li>
<li><a href=''>Moving</a></li>
<li><a href=''>New Job</a></li>
<li><a href=''>Retirement</a></li>
<li><a href=''>Good Luck</a></li>
<li><a href=''>Engagement</a></li>
</ul>

</div>
0

Several reasons spring to mind. You may have saved the include file with a BOM. If you copy the include file into a new file and then save as UTF8 without BOM (as possible in Notepad++), that'll be the first step out of the way. ALso, you may find that forcing the encoding to UTF-8 might help:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>...</title>
</head>
0

My guess it's somewhere between the transmission of the unordered list, there were differences between the character sets from the source and the destination. In your case, this might be your editor. If you can, set your editor's character set to your preference, UTF8 will suffice.

Check your editor's setting for charset selection.

Anyhow, for a quick fix, you can copy the unordered list part and paste it in an UNICODE to ASCII converter. You can see a lot of online converter, so you won't have a problem with it.

Edited by gon1387

0

Thanks for all your input guys, it was encoding, for some strange reason I'd changed the encoding in notepad++ to ansi, don't remember doing it or why I might've, senior moment I guess!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.