How could I combine these arrays??


Posted on 16th Feb 2014 07:03 pm by admin

Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array..

1st array:
Code: Array
(
[0] => zero
[1] => one
[2] => two
)

2nd array:
Code: Array
(
[0] => Array
(
[0] => test0
)

[1] => Array
(
[0] => test1
)

[2] => Array
(
[0] => test2
)
)

The array I'm trying to get out of both:
Code: Array
(
[zero] => Array
(
[0] => test0
)

[one] => Array
(
[0] => test1
)

[two] => Array
(
[0] => test2
)
)

No comments posted yet

Your Answer:

Login to answer
125 Like 40 Dislike
Previous forums Next forums
Other forums

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else

I can give them an F

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

Array becomes unset by itself?
Hi,

I have a bit of experience with PHP but not extensive. It seems I cannot store any items

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash