<?xml version="1.0" encoding="windows-1252"?>
<node id="610329" title="dynamic website, putting data into right tablefield's" created="2007-04-16 08:14:11" updated="2007-04-16 04:14:11">
<type id="115">
perlquestion</type>
<author id="496866">
ultibuzz</author>
<data>
<field name="doctext">
&lt;p&gt;Hello Monks,&lt;br /&gt;
i've a problem putting the right data into the right place of a table,i think the problem is more in my head then in html.&lt;br /&gt;
The Table shoud look like this&lt;/p&gt;
&lt;table border="1" bgcolor="#FFFFFF" align="left"&gt;
	&lt;tr&gt;
		&lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
		&lt;td colspan="2"&gt;sup_1&lt;/td&gt;
		&lt;td colspan="2"&gt;sup_2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Product&lt;/td&gt;
		&lt;td&gt;flag&lt;/td&gt;
		&lt;td&gt;data_s&lt;/td&gt;
		&lt;td&gt;data_f&lt;/td&gt;
		&lt;td&gt;data_s&lt;/td&gt;
		&lt;td&gt;data_f&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;P_Name&lt;/td&gt;
		&lt;td&gt;U&lt;/td&gt;
		&lt;td&gt;10&lt;/td&gt;
		&lt;td&gt;36&lt;/td&gt;
		&lt;td&gt;2&lt;/td&gt;
		&lt;td&gt;106&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;The Table is build dynamicly from 3 arrays&lt;br /&gt;
the @sup array contains all sup's&lt;br /&gt;
the @product array contains all P_Names&lt;br /&gt;
the @data array contains the hashref for each row, can have blanks,for test purpose i have a normal array&lt;/p&gt;
&lt;code&gt;
___sup___
1
2
3

__product__
Now
Promo
Special
Indirect

DATA fields PRODUCT,FLAG,SUP,DATA_S,DATA_F
__data__
Promo;X;2;10;5
Promo;X;1;22;106
Direct;U;1;;
Special;U;1;2;
&lt;/code&gt;
&lt;p&gt;The table shoud be build out of @product and @sup, and the informations from @data shoud be inserted if it matches,blanks also&lt;br /&gt;
my attemps so far are a forech loop for sup, then a for loop for product checking if sup is true or not and insert data.&lt;br /&gt;
this ends up in  duplicated P_Names and lots of free tabs in the table,so its totals crap ^^&lt;br /&gt;
at the moment ims tuc and don't get an idear how to make it, at the end all tabs will be &lt;code&gt;&lt;inputs&gt;&lt;/code&gt; to manipulate the data&lt;br /&gt;
the table format can not be changed&lt;br /&gt;&lt;br /&gt;kd ultibuzz&lt;/p&gt;</field>
</data>
</node>
