How to make text bold in PHP?
You don’t. The front-end styling is handled by CSS/HTML.
This is a syntax error in PHP:
echo <b> $result[0]["type1"]; </b>
Just as with the rest of your HTML, the HTML code goes outside of the <?php ?>
tags:
<td><b><?php echo $result[0]["type1"]; ?></b></td>
Alternatively, you could include the HTML in the PHP if you really want to, it would just be a string value like any other string:
<td><?php echo "<b>" . $result[0]["type1"] . "</b>"; ?></td>
Alternatively, you could skip the <b>
entirely and just use CSS:
<td style="font-weight: bold;"><?php echo $result[0]["type1"]; ?></td>