TomBullock Posted February 22, 2008 Share Posted February 22, 2008 Hello This is part of my script: { echo "online"; } else { echo "offline"; } As you can see, there is the word 'online' and 'offline'. How do i make the word 'online' green and the word 'offline' red? Thanks Link to comment https://forums.phpfreaks.com/topic/92427-adding-colour-to-text-in-php-script/ Share on other sites More sharing options...
Orio Posted February 22, 2008 Share Posted February 22, 2008 You can output HTML: <?php echo "<span style=\"color: green;\">online</span>"; ?> Orio. Link to comment https://forums.phpfreaks.com/topic/92427-adding-colour-to-text-in-php-script/#findComment-473553 Share on other sites More sharing options...
TomBullock Posted February 22, 2008 Author Share Posted February 22, 2008 Can i put that code on the same page under the current script? Link to comment https://forums.phpfreaks.com/topic/92427-adding-colour-to-text-in-php-script/#findComment-473554 Share on other sites More sharing options...
TomBullock Posted February 22, 2008 Author Share Posted February 22, 2008 Ohh ive got it Thanks for your help Link to comment https://forums.phpfreaks.com/topic/92427-adding-colour-to-text-in-php-script/#findComment-473556 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.