<td><input type="text" name="Books[year]" value=<?php echo $book->year; ?> ></td> </tr> <tr> <td><?php echo Books::getLabels('author', true); ?> </td> <td><input type="text" name="Books[author]" value=<?php echo $book->author; ?> ></td> </tr> <tr> <td><?php echo Books::getLabels('description', true); ?> </td> <td><input type="text" name="Books[description]" value=<?php echo $book->description; ?> ></td> </tr> <tr> <td></td> <td><input class='button' type="submit" name="save" /></td> </tr> </table> </form>
public static function addTitlesToTable($fields, &$list) { $list .= "<tr>"; foreach ($fields as $field) { $list .= "<td class='bold'>" . Books::getLabels($field) . "</td>"; } $list .= "</tr>"; }