php - Show data from database table in tabular format by using row and column index -
1 2 results 1 3 Overview 2 1 ABC 2 2 result 1 2 3 Observation 1
And I want to show the data in the html table in the following format
Test Result Overview ABC Result 1 Overview 1
Can anyone suggest how to do this?
Method:
- Output key Create an array
- Select each row from your table
-
Store them in the output array by the row and column index
such as :
$ ARR_OUPUT [$ row_no] [$ col_no] = $ name
-
The table can print
like:
echo & lt; Table & gt; '; Forex Currency ($ ARR_OUTPUT = & gt; arr_temp as the $ Key) {Echo '& lt; Tr & gt; '; Forex Currency ($ arr_temp $ name) {echo '& lt; Td> $ Name '& Lt; / Td> '; } Echo & lt; / Tr & gt; '; } Echo & lt; Table & gt; ';
Your array will look like this
array ([1] = & gt; array ([1] = & Gt; Test [2] = & gt; Results [3] => Inspection) [2] = & gt; Array ([1] => ABC [2] => 1 [3] = & Gt; Inspection 1))
Comments
Post a Comment