ReOrder Data
Posted: Sat Mar 31, 2012 8:50 pm
I want to asking about, how do PHP reorder data with their grammatical mean.
The pattern from database and input by anyway of user.
For example:
i[S] love[P] her[O].
i[S] sleep[P] lastnight[K]
In database record:
id|r1|r2|r3|r4|r_1|r_2|r_3|r_4|
1| S| P |O| - |O | P | S | - |
2| P| K |- | - | K | P | - | - |
And the result is [like pattern]:
he[O] love[P] i[S]
i[S] lastnight[K] sleep[P]
How to make it ?
Thank you.
The pattern from database and input by anyway of user.
For example:
i[S] love[P] her[O].
i[S] sleep[P] lastnight[K]
In database record:
id|r1|r2|r3|r4|r_1|r_2|r_3|r_4|
1| S| P |O| - |O | P | S | - |
2| P| K |- | - | K | P | - | - |
And the result is [like pattern]:
he[O] love[P] i[S]
i[S] lastnight[K] sleep[P]
How to make it ?
Thank you.