Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Combine 2 PHP array into multidimensional

aprakasa:

I have 2 separated arrays:


Array
(
[0] => Header 1
[1] => Header 2
)

Array
(
[0] => Array
(
[0] => Content #1
[1] => Content #2
)

[1] => Array
(
[0] => Content #1.1
)

)

How to combine those 2 arrays into multidimensional with a format like this below:


Array
(
[0] => Array
(
[Header 1] => Content #1
[Header 2] => Content #1.1
)

[1] => Array
(
[Header 1] => Content #2
)

)

The purpose is to create HTML table. I found a way to create a table from here How to create a HTML Table from a PHP array? but the array format should be like the last one.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Combine 2 PHP array into multidimensional

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×