How to do bold and simple text in the same line using the echo in php?

PHPServer Side ProgrammingProgramming

In order to get bold text, you need to use font-weight and to get the simple text you can use <span> tag. All this gets added in the echo.

Example

The PHP code is as follows

 Live Demo

<!DOCTYPE html>
<html>
<body>
<?php
echo '<span style="font-size: 20px; color: #006400; font-weight: bold;">This is my first PHP Program</span> '.$row['data'];
?>
</body>
</html>

Output

Here is the snapshot of sample output.

This is my first PHP Program
raja
Published on 13-Oct-2020 08:01:06
Advertisements