Change an $outputList to what

I am trying to use pagination but this is the issue I am having.

In part 1 the $outputList and the While $ rows=mysql_fetch_array($sql1)); are in the php section .

In part 2 in the html section, I am using the( php do )with a (while statement) that works and shows a 40 line list when I turn off part 1.

I need to change part 1 but to what is my question?
Because of the html part 2. If I leave part 1 on I get a sever error. If I turn part 1 off I get the 40 different list and I see the pagination, but the pagination does not work at all.

Any help would be great.

Part 1.

<?php // Build the Output Section Here $outputList = ''; WHILE($rows = mysql_fetch_array($sql1)): ?>

Part 2

<?php do { ?> p><?php echo $food['coffee']; ?> <?php } while ($food=mysql_fetch_assoc($sql1))?>
<?php print "$outputList"; ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service