Thursday, February 24, 2011

drupal, cck, tables

<table border="1" cellpadding="1" cellspacing="1" style="width: 90%;">
<thead>
<tr>
<th scope="col">name</th>
<th scope="col">email</th>
<th scope="col">phone</th>
</tr>
</thead>
<tbody align="center">
<?php for ($k=0;$k<count($node->field_class_category);$k++) { ?>
<tr>
<td><?php print $node->field_name[$k]['view']; ?></td>
<td><?php print $node->field_email[$k]['view']; ?></td>
<td><?php print $node->field_phone[$k]['view']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>

hainam giup

No comments:

Post a Comment