Sharon Ann Posted April 10, 2006 Share Posted April 10, 2006 HiThis 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 Link to comment https://forums.phpfreaks.com/topic/7070-change-font-colour-of-text-pulled-from-database/ Share on other sites More sharing options...
kenrbnsn Posted April 10, 2006 Share Posted April 10, 2006 You should learn to use CSS to specify how the data is presented. In your case, do something like:[code]<?phpecho '<span style="color:red">' . $row['f_staff_id'] . '</span> '; ?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/7070-change-font-colour-of-text-pulled-from-database/#findComment-25689 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.