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; ?>'>; 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? 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 ."'>"; ?> 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}';\">"; ?> 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
Archived
This topic is now archived and is closed to further replies.