maxudaskin Posted January 30, 2008 Share Posted January 30, 2008 Is it possible? {if($colourbare == 1){ echo ''; $colour = '#F2F2F2'; }else{ $colour = '#E2E2E2'; echo ''; } ?> <tr style='background-color:<?php $colour; ?>' onMouseOver='this.style.backgroundColor:#EFF4FB' onMouseOut='this.style.backgroundColor:<?php $colour; ?>'>; Quote Link to comment https://forums.phpfreaks.com/topic/88504-solved-php-echo-html-with-both-and/ Share on other sites More sharing options...
rhodesa Posted January 30, 2008 Share Posted January 30, 2008 I don't understand the question...can you please elaborate? Quote Link to comment https://forums.phpfreaks.com/topic/88504-solved-php-echo-html-with-both-and/#findComment-453058 Share on other sites More sharing options...
maxudaskin Posted January 30, 2008 Author Share Posted January 30, 2008 How can this be written properly? <?php echo "<tr style='background-color:". $colour ."' onMouseOver='this.style.backgroundColor:"#EFF4FB"' onMouseOut='this.style.backgroundColor:". $colour ."'>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/88504-solved-php-echo-html-with-both-and/#findComment-453061 Share on other sites More sharing options...
rhodesa Posted January 30, 2008 Share Posted January 30, 2008 <?php echo "<tr style=\"background-color:{$colour};\" onMouseOver=\"this.style.backgroundColor='#EFF4FB';\" onMouseOut=\"this.style.backgroundColor='{$colour}';\">"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/88504-solved-php-echo-html-with-both-and/#findComment-453064 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.