Well, it depends on whether you want to save the number or not, I guess.
If you do want to save it, create a field that will store the number and use AUTO_INCREMENT
, read about it here.
If you don't need it to be stored, well, just echo a variable that increases itself. Something like this.
$i = 0;
foreach($data as $value){
echo $i . ": " . $value;
$i++;
}
Mind, this is just a simple, basic code to give you an idea on how to do it.