NuwanD Posted September 13, 2009 Share Posted September 13, 2009 Im using joomla 1.5.8 on this site - www.fastfind(dot)com(dot)fj on the search result page I want the raws to be on 2 different colors 1 after another. (please see image) ANY HELP WOULD BE GREAT.. Thanks in Advanced Cheers [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
AviNahum Posted September 13, 2009 Share Posted September 13, 2009 simply, when you select the results from DB: <?php $x = 0; while ($results) { if ($x == 0) { $bgcolor = "black"; $x++; } else { $bgcolor = "white"; $x = 0; } echo "<div style='backgroung-color: {$bgcolor};'></div>"; } ?> Quote Link to comment Share on other sites More sharing options...
NuwanD Posted September 13, 2009 Author Share Posted September 13, 2009 Hi aviavi, the following code is the one to get result from DB. How would i apply Your code to this..?? Thanks for helping me out.Cheers ------------------------------- <?php foreach ($this->links AS $link) { $fields = $this->fields[$link->link_id]; include $this->loadTemplate('sub_listingSummary.tpl.php'); } Quote Link to comment 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.