When I do this
<li class="language">
<a href="felt.php?lang=en">en</a>
<a href="felt.php?lang=jp">jp</a>
<a href="felt.php?lang=ru">ru</a>
</li>
it gives me space between the a tags, with space

but when I do
echo '<li class="language">';
echo '<a href="felt.php?lang=en">en</a>';
echo '<a href="felt.php?lang=jp">jp</a>';
echo '<a href="felt.php?lang=ru">ru</a>';
echo '</li>';
It takes away the spaces. why is this? I have not applied any css...
It is because you are writing it wrong, you should write it like:
In your case, the
echowill consider it as inline so it will delete the space, if you want to keep your structure you can always add it like: