<p>Greetings,</p>

<p>I have data stored on mysql with delimiter "," in 1 table. 
I have rows and column stored on database too. 
Now i have to output the data using rows and column number stored on database to draw the table.</p>

<p>Rows and column number are user input, so it may varies.</p>

<p>Let say, there is number 3 on column and 3 on rows.</p>

<p>I need to do it like display like,</p>

<pre><code>|___d1__|___d2__|___d3__|
|___d4__|___d5__|___d6__|
|___d7__|___d8__|___d9__|
</code></pre>

<p>Where d1-d9 would be the data stored on mysql database with delimiter "," in one table.</p>

<p>Thanks for helping me.</p>

assuming that user set table size for 2 rows and 3 columns and makes some input fot 6 cells, data which will go to database will be
2,3,d1,d2,d3,d4,d5,d6
when you will fetch data from cell and make explode on fetched string you will get 1 dimension array with 8 elements
$r = $e[0] rows
$c = $e[1] cols
$e[2-7] data
wrtite openning < table > tag
two loops, one in another,
first one will generate code for start of row
wrtite openning < tr > tag
inside one will genereate code for row.
write opening < td > tag
write data $e[1 + position calulated from inside and outside loops]
write closing < td > tag
end of inside loop
wrtite closing < tr > tag
end of outside loop
wrtite closing < table > tag
It should give you the idea