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 7643023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:20:32+00:00 2026-05-31T09:20:32+00:00

I have data like this: something something_description, something2 something2_description, something3 something3_description… And now I

  • 0

I have data like this:

something something_description, something2 something2_description, something3 something3_description...

And now I need with PHP to get table as:

<tr><td>something</td><td>something_description</td></tr>
<tr><td>something2</td><td>something2_decription</td></tr>

I don’t know how many “something” and “something_decriptions” will it be so I need to set some loop.

for now I have this code:

$data = explode(',',$query);

from that I will get array like:

[0] => something something_description

Now how can I put this into table?

On net I found some examples for sorting array to table, but this is with one more “explode” inside “explode”

I could use some help.

  • 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-05-31T09:20:33+00:00Added an answer on May 31, 2026 at 9:20 am

    Probably you are looking for this:

        $data = explode(',',$query);
    
        echo '<table>';
        foreach($data as $row){
            echo '<tr>';
            $row = explode(' ',$row);
            foreach($row as $cell){
                echo '<td>';
                echo $cell;
                echo '</td>';
            }
            echo '</tr>';
        }
        echo '</table>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have data structures that're something like this: Public Class AttendenceRecord Public
I have some data that looks something like this... +----------+----------+----------+ | Column 1 |
If I have data like this: Key Name 1 Dan 2 Tom 3 Jon
Say I have data like this: <option value=abc >Test - 123</option> <option value=def >Test
I have a table like this: Application,Program,UsedObject It can have data like this: A,P1,ZZ
I have three tables: page, attachment, page-attachment I have data like this: page ID
I have some data like this : 1 TC1 PASS 2 TC2 FAIL 3
I have data that looks like this: entities id name 1 Apple 2 Orange
I have data that looks like this: #info #info2 1:SRX004541 Submitter: UT-MGS, UT-MGS Study:
I have a JSON data like this: { hello: { first:firstvalue, second:secondvalue }, hello2:

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.