perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Moran <p...@forloop.co.uk>
Subject Simple table problem
Date Wed, 03 Dec 2003 06:15:57 GMT
I know this is a really simple problem - and can be fixed using if
statements etc - but wanted to know if there was a standard way of doing
this.

Simply say I have a array

@array = qw/1 2 3 4 5 6 7 8 9 10/;

And I want to create a dynamic table of this data - BUT I want to have a
fixed column length (in this case 4).  The end table should look like

<table>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
    <td>4</td>
  </tr>
  <tr>
    <td>5</td>
    <td>6</td>
    <td>7</td>
    <td>8</td>
  </tr>
  <tr>
    <td>9</td>
    <td>10</td>
  </tr>
</table>

Using the dynamic table syntax and the associated magic variables - can
this be achieved - or do I have to add some custom code ?  Have checked
out various examples and searched the mailing list but seems either it
cant be done this way or I am yet again missing the point.



Regards



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message