You could use alternative syntax:
<?php for ($i=0; $i<5; $i++) : ?>
<tr>
<td>HBA Driver</td>
<td><input type="text" name="hba_driver<?php echo $i; ?>" value="<?php echo $hba_driver . $i; ?>"></td>
</tr>
<?php endfor; ?>
Your style would've been:
for ($i=0;$i<5;$i++) {
echo "<tr><td>HBA Driver</td><td><input type='text' name='hba_driver$i' value='" . $hba_driver . $i . "' /></td></tr>";
}
Note that single quotes don't parse variables:
$i = 5;
echo '$i apples'; // $i apples
echo "$i apples"; // 5 apples
echo $i . " apples"; // 5 apples
echo $i . ' apples'; // 5 apples
echo "value='$i apples'"; // value='5 apples'