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:

  1. Output key Create an array
  2. Select each row from your table
  3. Store them in the output array by the row and column index

    such as :

    $ ARR_OUPUT [$ row_no] [$ col_no] = $ name

  4. 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; ';  
  5. 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

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -