使 PHP 输出加粗 [英] Making PHP output Bold

查看:33
本文介绍了使 PHP 输出加粗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在弄清楚如何使我的 php 输出加粗时遇到了麻烦,我尝试过 但我在尝试时收到并出错.我曾尝试搜索此主题,但在我的情况下,似乎没有任何答案对我有帮助.

I am having trouble figuring out how to make my php output bold, I have tried but I receive and error when I try that. I have tried to search this topic but none of the answers seem to be helping me in my situation.

   while($row = mysql_fetch_array($oPlayerInfo))
{
Print "".$row['FirstName']." ".$row['LastName']."<br>";
Print "Position: ".$row['Position']."<br>";
Print "Height: ".$row['Height']."<br>";  
Print "Weight: ".$row['Weight']."<br>";
Print "Birthdate: ".$row['DOB']."<br>";
Print "CNGHL Team: ".$row['CNGHLRights']."<br>";
Print "NHL Team: ".$row['Team']."<br>";
Print "Draft Year: ".$row['CNDraftYR']."<br>";
Print "Draft Position: ".$row['CNDraftPOS']."<br>"; 
Print "Drafted By: ".$row['CNDraftTEAM']."<br>";
Print "<img src=\"http://www.cnghl.biz/cnghldb/images/".$iPlayerID.".jpg\">";

推荐答案

只需将 HTML 强标签添加到您的打印中,删除不需要的行.

Simply add HTML strong tags into your print, removing on lines where it is not necessary.

while($row = mysql_fetch_array($oPlayerInfo))
{
  Print "<strong>".$row['FirstName']." ".$row['LastName']."</strong><br>";
  Print "<strong>Position: ".$row['Position']."</strong><br>";
  Print "<strong>Height: ".$row['Height']."</strong><br>";  
  Print "<strong>Weight: ".$row['Weight']."</strong><br>";
  Print "<strong>Birthdate: ".$row['DOB']."</strong><br>";
  Print "<strong>CNGHL Team: ".$row['CNGHLRights']."</strong><br>";
  Print "<strong>NHL Team: ".$row['Team']."</strong><br>";
  Print "<strong>Draft Year: ".$row['CNDraftYR']."</strong><br>";
  Print "<strong>Draft Position: ".$row['CNDraftPOS']."</strong><br>"; 
  Print "<strong>Drafted By: ".$row['CNDraftTEAM']."</strong><br>";
  Print "<img src=\"http://www.cnghl.biz/cnghldb/images/".$iPlayerID.".jpg\">";
}

有了这个

Print "<strong>Height: ".$row['Height']."</strong><br>";

整行将是粗体.与下面的一个

The whole line will be bold. With the one below

Print "<strong>Height:</strong> ".$row['Height']."<br>";

只有标签是粗体的.

这篇关于使 PHP 输出加粗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆