| mosHTML::idBox |
|
Last reviewed: Not reviewed mosHTML::idBoxBuilds the HTML code for a standard selectable checkbox for use on a database list-select screen. Syntaxstring idBox ( integer $row_index, integer $record_id [, boolean $enable [, string $name ]] )
ExamplesExample: Display a list of records from a database query with standard selection checkboxes. Note that in this example the table row class is alternated between "row0" and "row1" so as to get the striped effect. Only the id and title fields are shown in this example.// $rows returned from a database query. $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row = $rows[$i]; ?> <tr class="<?php echo "row$k"; ?>"> <td width="20"> <?php echo mosHTML::idBox( $i, $row->id ); ?> </td> <td> <?php echo $row->title; ?> </td> </tr> <?php $k = 1 - $k; } Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Saturday, 03 September 2005 ) |