Re: [phpXperts] Displaying HTML
- You can tryl following ways:
1. Make a dynamic array from db result.
$arrMember = array();
$arrResult = array();
while($row = mysql_fetch_array($result))
$arrResult[$row['test_name']][$row['member_id']] = $row['score'];
$arrMember[$row['member_id']] = $row['member_name']
2. Then using list-each loop, you can easily make your table.
ThanksOn Wed, Mar 19, 2008 at 8:51 AM, shivam0101 <shivam0101@...> wrote:
I have a table and its structure is,
I want to display the values in the below format.
In the first row,
Members> member1 member2 member3 member n
Members> is static text. member1, member2...member..n are dynamic
In the second row,
Tests V - - - -
Tests V is static text.
In the third row,
test1 m1_t1_score m2_t1_score m3_t1_score mn_t1_score
test1 is dynamic test name. m1_t1_score, m2_t1_score....mn_t1_score
are scores of members in test1
in the fourth row,
test2 m1_t2_score m2_t2_score m3_t2_score mn_t2_score
test2 is dynamic test name. m1_t2_score, m2_t2_score ....mn_t2_score
are scores of members in test2
This pattern continues till test n.