<p>I just had some basic php questions to further my understanding as I learn, that I could not find easy answers to</p>

<ol>
<li><p>I have a php ajax application that generates a table of mysql rows. I would like to know if there is a way to get php to generate neat html, as it seems neat enough as I echo it out, but when "viewing source" the html is a huge jumbled block with no line breaks or anything. Is there a trick to doing this?</p></li>
<li><p>What is the best way to limit table output for a mysql database, so only the first 10 records or so are displayed, and there are automatically generated next and previous links to go between records?</p></li>
<li><p>When outputting information with php from a mysql database, what is the best way to handle booleans? What is the easiest way to display the words "yes" or "no" or a tick or a cross? edit: I do not mean should I use words or pictures, but rather how to show either in response to a boolean</p></li>
</ol>

You could use the
PHP Tidy Addon
. Keep in mind, that filtering the HTML with it uses quite some Server CPU. Alternatively you have to print the line breaks yourself (echo "\n";)
However I suggest, that you leave it as it is. Just consider how many people will benefit from reading the source code vs. how many people will benefit from smaller file sizes if you don't format the HTML nicely.
You have to do that manually. There are some helping libraries available on the net. Just
Google it
.
That's up to you to decide and depends on the application. Keep your users needs in mind.