![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to do bold and simple text in the same line using the echo in php?
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
<!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
Advertisements