Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:41:46+00:00 2026-06-12T00:41:46+00:00

Hello I have a sample set of data in my database: +———–+————-+—————+——-+ | IDNumber

  • 0

Hello I have a sample set of data in my database:

+-----------+-------------+---------------+-------+
| IDNumber  | SubjectCode | SubjectName   | Grade |
+-----------+-------------+---------------+-------+
| 2012-1234 | IT-101      | Intro to I.T  | 1.75  |
| 2012-1234 | IT-202      | Advanced I.T  | 1.50  |
| 2012-5678 | CS-300      | Haskell Prog. | 1.00  |
+-----------+-------------+---------------+-------+

My problem is how can I automatically create a table in PHP base on their data. Let’s say when I want to search for IDNumber 2012-1234 it will create 4 column and 2 rows automatically and print it in the browswer, the same with IDNumber 2012-5678.

Just give me some hint and I’ll just do the rest. Some help / ideas will be much more appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:41:47+00:00Added an answer on June 12, 2026 at 12:41 am
    $result = $db->query("SELECT * FROM table");
    $names_fetched = false;
    $row_names = [];
    while ($row = $result->fetchAssoc()) {
      if (!$names_fetched) {
         $row_names = array_keys($result); //row titles are here
         $names_fecthed = true;
      }
      //other staff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have a hello world sample or tutorial for creating an Eclipse plugin
I have simple Sinatra app. web.rb: require 'sinatra' get '/' do Hello end Gemfile:*
I have a simple PHP app that prints 'hello world'. When I run it
I have following simple program: import std.stdio; int main(string[] argv) { writeln(Hello, world!); return
I have this simple html: <div class=wrapper> <span class=higher> [higher] <span class=lower> hello </span>
suppose I have a simple container which have three element: <div> <span>hello world</span> <input
Let's say I have some simple Javascript like: <script> var hello = function(){ alert(Hello
Hello every one I have wrote a simple code in html5 in which I
I have the following simple select statement : select 'hello' || '|' || 'world'
Hello again dearest Experts, I have an ecommerce site at http://www.millenniumhealthproducts.com The site was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.