开发者

changing the colour of an echo command

ive searched this question on google and i've found many answers but none of them seem to work in my situation.

i need to echo out a command in orange, but everything i do doesn't seem to work.

while($row = mysql_fetch_array($result))
  {
  echo 开发者_如何转开发$row ['title_name'];
  echo "<br />";
  echo $row['date'];
  echo "<br />";
  echo $row['message'];
  echo "<br />";
  }

i need the title_name to be in orange "#FF9900"

has any got got any ideas on how i can do this

many thanks Connor


while($row = mysql_fetch_array($result))
{
  echo "<span style='color:orange'>".$row ['title_name']."</span>";
  echo "<br />";
  echo $row['date'];
  echo "<br />";
  echo $row['message'];
  echo "<br />";
  }

that all


...
echo "<span style=\"color: #FF9900;\">".$row['title_name']."</span>";
...


echo '<span style="color: #FF9900">' . $row ['title_name'] . '</span>';

?


There's this thing called HTML... and another thing called CSS...

echo '<span style="color: #ff9900">', $row['title_name'], '</span>';
echo '<font color="#ff9900">', $row['title_name'], '</font>';


Use some HTML.

echo '<span style="color: #ff9900;">'.$row['title_name'].'</span>';

Actually you should put the CSS seperately, but this works as an example :X


echo "<font style='color:#FF9900'>".$row ['title_name']."</font>"; should work as it looks like you are developing a web app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜