note 93868 added to language.operators.logical
| From: | mcluvin at sogetthis dot com | Date: | Sun, 04 Oct 2009 20:45:59 +0000 |
| Subject: | note 93868 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161266@lists.php.net to get a copy of this message | ||
@daevid
Better still, don't do it with PHP. Since zebra-striping is purely cosmetic, have your UI
library handle it. JQuery can do it in one line:
<code>
$('tr').addClass('dataRow1').filter(':even').addClass('dataRow2');
</code>
For 1, this removes the load on your server. For 2 it keeps your html, php, and css all cleaner.
If people disable javascript, they're missing what today's web offers, and zebra-striping
hasn't been shown to improve efficiency anyway.
Another good alternative is pure css:
<code>
tr:hover {background-color:lightgray}
</code>
which highlights the row the mouse is over. Either way, if you're doing it with php
you're not doing it well.
----
Server IP: 209.41.74.194
Probable Submitter: 173.50.234.106
----
Manual Page -- http://www.php.net/manual/en/language.operators.logical.php
Edit -- https://master.php.net/note/edit/93868
Del: integrated -- https://master.php.net/note/delete/93868/integrated
Del: useless -- https://master.php.net/note/delete/93868/useless
Del: bad code -- https://master.php.net/note/delete/93868/bad+code
Del: spam -- https://master.php.net/note/delete/93868/spam
Del: non-english -- https://master.php.net/note/delete/93868/non-english
Del: in docs -- https://master.php.net/note/delete/93868/in+docs
Del: other reasons-- https://master.php.net/note/delete/93868
Reject -- https://master.php.net/note/reject/93868
Search -- https://master.php.net/manage/user-notes.php