My Print() Output squashed up

I have some PHP code which displays a large .jpg and then displays links to the next page, the previous page, the next chapter, the previous chapter.

It works but the links are all at the foot of the screen, which is okay by me, but all squashed up together, even one on top of another, so’s you can’t see clearly what they are and can’t really know which link you’re clicking on…

Here’s the code:
$out = “<img src=\”/images/{$pic}.jpg\" alt=\“Page {$page}\” />";

if ($prevChapter &gt; 0) $out .= "&lt;a href=\\"/mybook.php?chapter={$prevChapter}\\"&gt;Prev Chapter&lt;/a&gt;";
and so on.........

How can I get this sorted?

Can you post what the links actually look like (HTML)

If its not just a CSS issue it could just be a single spacing issue. Add some spaces to what you are printing out

$out .= "<a href=\\"/mybook.php?chapter={$prevChapter}\\">Prev Chapter | </a>"; 

Well they look like this: Prev ChapterNext at the bottom right of the screen and : Page Next Chapter one line lower on the left of the screen. Both of them actually over the bottom part of the jpg image.

I’ll attach a screen grab of it.

It looks like a css issue so assuming the image isn’t floated try setting it to display:block to force the anchors to start on a new line after it. (It also depends what css you have applied to the anchors temselves of course.)

Thank you.