Jump to content


Photo

Change font colour of text pulled from database


  • Please log in to reply
1 reply to this topic

#1 Sharon Ann

Sharon Ann
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 10 April 2006 - 11:05 PM

Hi

This is probably a very simple question but I have tried a few different ways today and the php keeps sending me error messages.

I want to change the colour of the staff number to red when displayed on the page, here is the bit of code I have to work with,

echo "Staff Number: ";
echo ($row['f_staff_id']) . " ";


Where do I put the <font color "red"> </font> tags in the second row?

Is it like this?


echo "<font color "red">($row['f_staff_id'])</font> . " ";

Can anyone sort me out with the correct way?

Thanks

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 10 April 2006 - 11:35 PM

You should learn to use CSS to specify how the data is presented. In your case, do something like:
<?php
echo '<span style="color:red">' . $row['f_staff_id'] . '</span> '; ?>

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users