rawky1976 Posted August 28, 2007 Share Posted August 28, 2007 Hi I have an array that displays all errors in form input. I want them to be red, how do I apply styles to this line (ie <...style="color:red"...> : - echo " - $msg<br />\n"; which appears inside: - } else { echo 'Error! <p>The following error(s) occurred: <br />'; foreach($errors as $msg){ echo " - $msg<br />\n"; } ???, thank you! Link to comment https://forums.phpfreaks.com/topic/67123-solved-adding-stylecolorred-to-php/ Share on other sites More sharing options...
Wuhtzu Posted August 28, 2007 Share Posted August 28, 2007 Simply add the html tags you want... } else { echo 'Error! <p>The following error(s) occurred: <br />'; foreach($errors as $msg){ echo "<...style=\"color:red\"...> - $msg</...><br />\n"; } Link to comment https://forums.phpfreaks.com/topic/67123-solved-adding-stylecolorred-to-php/#findComment-336631 Share on other sites More sharing options...
rawky1976 Posted August 28, 2007 Author Share Posted August 28, 2007 Great thanks; love the pic, fox eating Bill Gates! Unfortunatley I have to code for IE for this project (when will they learn?) Link to comment https://forums.phpfreaks.com/topic/67123-solved-adding-stylecolorred-to-php/#findComment-336640 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.