Merging arrays, adding array as dimension to existing array

Posted by JohnDoe on Stack Overflow See other posts from Stack Overflow or by JohnDoe
Published on 2013-06-29T16:13:52Z Indexed on 2013/06/29 16:21 UTC
Read the original article Hit count: 162

Filed under:
|

Lets say i have 2 arrays

Array1

array($info)

$info['id'] => some id
$info['text'] => some text
etc

lets say i have a function that returns another array called images

Array 2

array($images)

$images[0] => some link 1
$images[1] => some link 2
etc

How do i add $images to the $info array as a new dimension, as such

$info['image'][0] => some link 1
$info['image'][1] => some link 2

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays