how to pass the range of dynamic arrays through loop?
<p>hi everyone i have the reterieve the table through arrays ,now i want to display that array in other table on the bases of user inputs like if user enter 2 then only 2 types tables will appear as well the data of table if user enter 3 three 3 tables with computaed data display</p>

<p>coding of table reterieval</p>

<pre><code>&lt;?php
include('config.php');
$sa="select * from table1 where c13='$d'";
$result=mysql_query($sa) or die(mysql_error());
echo "&lt;table border='1'&gt;
&lt;tr&gt;

&lt;/tr&gt;";


 $row_count=0;
while($row = mysql_fetch_array($result)) 
{ 
    echo $row['c1'];
    echo $row['c2'];
    echo $row['c3'];
    echo $row['c4'];
$a[]=$row['c1'];
        $b[]=$row['c2'];
            $c[]=$row['c3'];
            $d[]=$row['c4'];
$m[]=round(($row['c1']/$row['c4']),2);
                $n[]=round(($row['c2']/$row['c4']),2);
                $o[]=round(($row['c3']/$row['c4']),2);
$row_count++;
 }
echo "Measuring table";
for($i=0;$i&lt;$row_count;$i++) 
{ // do the exploding, the imploding, the row echoing for each row// 
echo "&lt;table border='1' align='center'&gt;
&lt;tr&gt;
&lt;th&gt;Inputs&lt;/th&gt;
&lt;th&gt;A&lt;/th&gt;
&lt;th&gt;B&lt;/th&gt;
&lt;th&gt;C&lt;/th&gt;
&lt;/tr&gt;";
  echo "&lt;tr&gt;";

     $f=implode($m,',');
     $r=explode(',',$f);
     print_r($f);
     $f1=implode($n,',');
     $r1=explode(',',$f1);
     print_r($f1);
     $f2=implode($o,',');
     $r2=explode(',',$f2);
     print_r($f2);
echo "&lt;td&gt;" ."W". "&lt;/td&gt;";
echo "&lt;td&gt;".$r['0']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
echo  "&lt;td&gt;" ."N". "&lt;/td&gt;";
echo "&lt;td&gt;".$r1['$i']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
echo  "&lt;td&gt;" ."D"."&lt;/td&gt;";
echo "&lt;td&gt;".$r2['$i']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
 echo "&lt;td&gt;" ."W". "&lt;/td&gt;";
echo "&lt;td&gt;".$r['$i']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
echo  "&lt;td&gt;" ."N". "&lt;/td&gt;";
echo "&lt;td&gt;".$r1['$i']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
echo  "&lt;td&gt;" ."D"."&lt;/td&gt;";
echo "&lt;td&gt;".$r2['$i']. "&lt;/td&gt;";

 echo "&lt;/tr&gt;"; 
 &lt;/tables&gt;
</code></pre>

<p>instead of mentioning array index explicity it should be display dynamically
reslut like ths</p>

<pre><code>c13=2(user enter value)
row1 2 3 4 
row2 4 6 7
</code></pre>

<p>after reterival</p>

<pre><code>        a       
w       2  
n       3
d       4    // this is of index 0//
w       4
n       6
d       7    // this is of index 1//
</code></pre>

<p>if now user enter 3, 3 rows will be in the databse 
after reterival</p>

<pre><code>w
n
d
w
n
d
w
n
d
</code></pre>

<p>how can i do ths dynamically
 i want that measuring table display dynamically bases on user input .plz help me 
kindly help me ppl</p>
