Bold Normal';">
 Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> PHP

PHP ทำ bold และข้อความธรรมดาในบรรทัดเดียวด้วย echo

เพื่อให้ได้ bold text คุณต้องใช้ font-weight และเพื่อให้ได้ simple text คุณสามารถใช้ tag ทั้งหมดนี้จะถูกเพิ่มใน echo

ตัวอย่าง

โค้ด PHP ดังนี้

<!DOCTYPE html> <html> <body> <?php 
echo 'This is my first PHP Program '.$row['data']; 
?> </body> </html>

ผลลัพธ์

นี่คือ snapshot ของตัวอย่างเอาต์พุต

This is my first PHP Program