Don't know if you solved it, but on a quick-glance I noticed that you have something like this:
<?php
echo "<p class="stat">Sold: $stat1 Done: $stat2 </p>;" // semi-colon inside quotes
?>
But you are not escaping the double-quotes. And your semi-colon is inside of the quote-marks.
So, one fix would be this:
<?php
// escape the double quotes
echo "<p class=\"stat\">Sold: $stat1 Done: $stat2 </p>"; // semi-colon after quotes
?>
Notice the use of the backslash \ character to escape the double-quotes within the echo statement. It tells php to render the quotes rather than consider them the end of the echo statement.
ANother way is to use single-quotes:
<?php
// use single quotes and concatenate:
echo '<p class="stat">Sold: ' . $stat1 . ' Done: ' . $stat2 . ' </p>';
?>