Jump to content

manupulating Multidimentional arrays


ceci

Recommended Posts

Hi all.

 

I have a mysql table with two main columns ColumnX and ColumnY each containing data in '|' delimited format.

Eg. Column X = |A|B|C|D|E| and Column Y = |a|b|c|d|e|

 

Using this data column X and Column Y I need to Dynamically construct a table like the one below. The end-user will be able to

enter a value for each corresponding X,Y value. eg. good bad. See attached file for screenshot.

 

<table  border="2">
<tr>
<td> </td>
<td>A</td> 
<td>B</td> 
<td>C</td>
<td>D</td>
<td>E</td>
<td>F</td>
<td>G</td>
</tr>
<tr>
<td>a</td> 
<td>good</td> 
<td>good</td> 
<td>good</td>
<td>bad</td>
<td>good</td>
<td>good</td>
<td>good</td> 
</tr>
<tr>
<td>b</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
<tr>
<td>c</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
<tr>
<td>d</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
<td>e</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
<td>f</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
<td>g</td> 
<td> </td> 
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td> 
<td> </td>
</tr>
</table> 

Take a look at this image to give you a better idea of what I need to accomplish.

http://audiologyonline.com/resources/article/hatchertable.png

 

What would be the best way to accomplish this?

 

Thank you so much.

 

Ceci

 

[attachment deleted by admin]

Link to comment
Share on other sites

Thanks for the link its somewhat helpful.

 

To make things simpler, say I have two variables.

 

$var1 = |A|B|C|;

$var2 = |X|Y|Z|;

 

how do i generate dynamically table with a top header with A B C and a LEFT COLUMN with X Y Z?

I am hoping that once this is figured out, things will start to make sense at least on my end.

 

Right now I am just stumped  as to how to achieve this... I hope someone has an example I can take a look at.

 

Thanks again.

 

C

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.