To group the results in the manner you are describing, you have to first set a variable to be blank, compare it against the grouping, then reset it.
The following is a code example that will create alphabetical headings for the depot names:
<?php $firstLetter = "";?>
<?php do { ?>
<?php
if($firstLetter != substr($row_rsDepots['depotName'], 0, 1)) {
echo("<b>".substr($row_rsDepots['depotName'], 0, 1)."</b><br>");
$firstLetter = substr($row_rsDepots['depotName'], 0, 1);
}
?>
<?php echo $row_rsDepots['depotName']; ?><br>
<?php } while ($row_rsDepots = mysql_fetch_assoc($row_rsDepots)); ?>