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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:31:00+00:00 2026-06-17T16:31:00+00:00

I have generated a master array which looks a little like this: Array (

  • 0

I have generated a “master” array which looks a little like this:

Array ( [userID] => 152 [email] => xxxxx@googlemail.com [name] => Jay jay go go [stream] => 616 ) 
Array ( [userID] => 133 [email] => damxxxxian@indigo.com [name] => Damian T [stream] => 616 ) 
Array ( [userID] => 154 [email] => julie@indigo.com [name] => Julie1000 E [stream] => 615 [PROGRAMME] => Designer ) 
Array ( [userID] => 153 [email] => jay@indigo.com [name] => James1000 G [stream] => 616 [PROGRAMME] => Apple Develpepr ) 

This is the output from a loop through a single array, so each of these 4 arrays are have keys 0 – 3.

My problem is that I want a table creating to hold all this data, with each row representing a user, but the array keys can be slightly different. For example, the first 2 users have no “programme” array key/value, but I want there to be a column saying “programme” but have it empty for users that dont have this in their array.

Hope that makes sense.

  • 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-17T16:31:01+00:00Added an answer on June 17, 2026 at 4:31 pm

    This can be accomplished by merging all of those arrays into a single array. Loop through every item in the array, gathering the keys (in_array might help there). Loop through your keys array to print out all the column headers in your table, then when your script needs to output the array you can simply run in a loop over each person, looping through each property as it maps to the column. That’s kind of abstract, but I think you can fill in the rest. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I have an array that looks like this. [Enter Sandman, One, Nothing
I currently have an array I created like this: $regions=array( 1=>'North West', 2=>'North East',
I have a dataset obtained from MySQL that goes like this: Array ( [0]
I have generated using openssl mycert.pem which contents the certificate. And I converted the
I have a master array of length n of id numbers that apply to
I have this two arrays. one is generated using a standard SELECT query, the
I have this simple code to generate a lazy array: lazy_arr = Enumerator.new {
I have a table Which I want show recursively like below picture I am
I have the C source code of a keygen to generate Master Codes for
I have generated a DAL layer with Subsonic2.2 for a .NET4.0 application, using c#

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.