note 77409 added to function.is-int
| From: | fraug at osu1 dot php dot net | Date: | Tue, 28 Aug 2007 16:17:57 +0000 |
| Subject: | note 77409 added to function.is-int | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129858@lists.php.net to get a copy of this message | ||
Although it has nothing to do with this particular function, this is how I do alternating row
classes. I haven't used it on large tables so I don't know about speed but it doesn't
rely on numbers so you can name them whatever you want:
<?
$altRowClasses = array('row1', 'row2', 'rowYermom');
echo '<table>';
for ($i = 0; i<15; i++)
{
$rowClass = array_shift($altRowClasses);
echo '<tr class="' . $rowClass . '">';
echo '<td>table_data</td>';
echo '</tr>';
array_push($altRowClasses, $rowClass);
}
echo '</table>';
?>
----
Server IP: 209.41.74.194
Probable Submitter: 69.12.133.182
----
Manual Page -- http://www.php.net/manual/en/function.is-int.php
Edit -- https://master.php.net/note/edit/77409
Del: integrated -- https://master.php.net/note/delete/77409/integrated
Del: useless -- https://master.php.net/note/delete/77409/useless
Del: bad code -- https://master.php.net/note/delete/77409/bad+code
Del: spam -- https://master.php.net/note/delete/77409/spam
Del: non-english -- https://master.php.net/note/delete/77409/non-english
Del: in docs -- https://master.php.net/note/delete/77409/in+docs
Del: other reasons-- https://master.php.net/note/delete/77409
Reject -- https://master.php.net/note/reject/77409
Search -- https://master.php.net/manage/user-notes.php