I'm trying to find the easiest way to do this. (PHP or Javascript) Basically, I have a text file that looks like this:
1
的
de/dí /dì
(possessive particle)/of, really and truly, aim/clear
2
一
yī
one/1/single/a(n)
3
是
shì
is/are/am/yes/to be
4
不
bù /bú
(negative prefix)/not/no
5
了
le/liǎo /liào
(modal particle intensifying preceding clause)/(completed action marker), to know/to understand/to know, clear, look afar from a high place
I want to read the data and insert it into a table such as:
<table cellpadding="0" cellspacing="0" border="1">
<tr>
<td width="50" height="50" align="center">1</td>
<td width="50" height="50" align="center" >的</td>
<td width="50" height="50" align="center">de/dí /dì</td>
<td width="50" height="50" align="center">(possessive particle)/of, really and truly, aim/clear</td>
</tr>
<tr>
<td width="50" height="50" align="center">2</td>
<td width="50" height="50" align="center">一</td>
<td width="50" height="50" align="center">yī </td>
<td width="50" height="50" align="center">one/1/single/a(n)</td>
</tr>
</table>
I suppose there are two ways to do this. The first is organizing the content into variables (1a, 1b, 1c, 1d, 2a, 2b, 2c, 2d...) and then find some way to with minimal effort to insert the variables into a set number of tables.
The second way is to organize the data in an array, then array the data to generate a table. I think this may be the best way, but I need to be able to specify which portion of the table (like page 1 (entries 1-100), etc.