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

  • Home
  • SEARCH
  • 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 6120131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:37:59+00:00 2026-05-23T15:37:59+00:00

$groups = array(Group1=>array(V1=>array(1,2,3,4,5), V2=>array(2,3,4,5,6), V3=>array(3,4,5,6,7) ), Group2=>array(V1=>array(11,22,33,44,55), V2=>array(11,21,31,41,51), V3=>array(12,23,34,45,56) ), Group3=>array(V1=>array(1,2,3,4,5), V2=>array(1,2,3,4,5), V3=>array(1,2,3,4,5) ),

  • 0
$groups = array("Group1"=>array("V1"=>array(1,2,3,4,5),
                                "V2"=>array(2,3,4,5,6),
                                "V3"=>array(3,4,5,6,7)
                                ),
                "Group2"=>array("V1"=>array(11,22,33,44,55),
                                "V2"=>array(11,21,31,41,51),
                                "V3"=>array(12,23,34,45,56)
                                ),
                "Group3"=>array("V1"=>array(1,2,3,4,5),
                                "V2"=>array(1,2,3,4,5),
                                "V3"=>array(1,2,3,4,5)
                                ),
                "Group4"=>array("V1"=>array(1,2,3,4,5),
                                "V2"=>array(1,2,3,4,5),
                                "V3"=>array(1,2,3,4,5)
                                ),
                "Group5"=>array("V1"=>array(1,2,3,4,5),
                                "V2"=>array(1,2,3,4,5),
                                "V3"=>array(1,2,3,4,5)
                                )                
                );

I want to display from this array to html table some thing like this

     Group1          | Group2
     h1|h2|h3|h4|h5  | h1|h2|h3|h4|h5
V1   value of its       value of its
V2   value of its       value of its
V3

    Group3          |  Group4
    h1|h2|h3|h4|h5  |  h1|h2|h3|h4|h5
V1   value of its       value of its
V2   value of its       value of its
V3   value of its       value of its

    Group5          | 
    h1|h2|h3|h4|h5  | 
V1   value of its     
V2   value of its     
V3   value of its     

I am trying to do like this:

 $g_list = array_keys($groups);
echo '<table border=1>';
for($g=0;$g<=sizeOf($groups);$g++){  
    if(($g+1)<sizeOf($groups)){
        echo "<tr>
                <td COLSPAN=6 ALIGN=center>".$g_list[$g]."</td>
                <td COLSPAN=6 ALIGN=center>".$g_list[$g+1]."</td></tr>";
        echo "<tr>
                <td>&nbsp</td><td>h1</td><td>h2</td><td>h3</td><td>h4</td><td>h5</td>
                <td>&nbsp</td><td>h1</td><td>h2</td><td>h3</td><td>h4</td><td>h5</td>
            </tr>";
         echo "<tr>
                <td>V</td>
                </tr>";
       //todo
    }
}

I could not find it out? Anybody could help me in php?

  • 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-23T15:38:00+00:00Added an answer on May 23, 2026 at 3:38 pm

    Here- Not great, but works 🙂

    foreach($groups as $group_name=>$group){
    
        echo '<table>';
        echo '<tr>';
        echo '<td>h1</td><td>h2</td><td>h3</td><td>h4</td><td>h5</td>';
    
        foreach($group as $version=>$values){
    
    
            echo '<tr><td>'.$version.'</td>';
            foreach($values as $value){
                echo '<td>'.$value.'</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

I have a JSON array like this [{Email:someone@some.com,Name:ACO,Groups:[MOD_SW,MOD_PI,MOD_GE],Id:63,Url:aco}, {Email:someone@some.com,Name:Agpo,Groups:[MOD_PI],Id:22,Url:agpo}, {Email:someone@some.com,Name:Akatherm,Groups:[MOD_SW],Id:64,Url:akatherm}, {Email:someone@some.com,Name:Albrand,Groups:[MOD_PI,MOD_GE],Id:23,Url:albrand}] I want to
I wrote two queries to find duplicates in the array var groups = from
I'm trying to generate this html hierarchy in my zend_form display group: <div class=settings>
I want to replace word groups by links. I use a multi-dimensional array to
This is a code from my c# web application here [ Response.Write(match.Groups[1]); ] i
I'm trying to display an array of dictionaries variable in the table Cell Style
I have an array and I want to display only 4 items at a
I want to be able to display my posts tags array [0] => grill
So I two groups tblTenant.ID tblTransaction.TenantID In tblTransactions there are two fields I want
I have a Groups table and a Participants table. Now I need to insert

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.