note 77409 deleted from function.is-int by nlopess

From: Date: Tue, 04 Sep 2007 14:25:43 +0000
Subject: note 77409 deleted from function.is-int by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130162@lists.php.net to get a copy of this message
Note Submitter: fraug ---- 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>'; ?>

« previous php.notes (#130162) next »