[eluser]louisl[/eluser]
This isn't a code igniter related question. You were right to let that programer go - that code is horrific in so many ways. If the job has been done with code igniter the guy was clueless.
If you echo the $number1 variable on line below the <div class="bought"> and it returns 5 not 50 your problem lies much deeper, but to be honest looking at that PHP code and the HTML code the jobs bound to have problems all over the place. You're going to need a good programer to sort this out.
Code:
<?php
echo('$number1: '.$number1.'<br />');
?>
PS always place code in code tags.