Array-merge as title suggests it is about merging array. Merging array means elements of one or more array will be merged together in single array.

learn more… | top users | synonyms

0
votes
1answer
18 views

Merging two arrays, styling each a different way

I have a list of letters. I compare this list of letters against an array of the alphabet and get the difference. Then they're put together into one array so I can output it as one list. //start the ...
1
vote
5answers
62 views

Array merging issue

I've following two arrays as follows, $array1 = array ( 'Name' => 'Scott', 'Department' => 'Sales', 'Location' => 'USA', 'Details' => array ...
0
votes
3answers
24 views

Append elements from one array to another array

I have $array1 and $array2 both of them are results from CodeIgniter ->result_array() ARRAY1 Array( [0] => Array( [name] => John, [course] => ...
4
votes
1answer
42 views

How to merge multidimensional arrays while preserving keys?

Is there a way for these arrays $array1 = array( '21-24' => array( '1' => array("...") ) ); $array2 = array( '21-24' => array( '7' => array("..."), ) ); ...
0
votes
1answer
29 views

Combine 2 associative arrays

I have 2 arrays that i have created from 2 different systems: URL changed I need to loop through the array on the left and find a match for the business, address and zip. If there is a match on the ...
1
vote
2answers
24 views

multidimensional array, transpositional values and merged result

I have and array $aArg with these values array ( 0 => 'reviewed_entity', 1 => 'kiosk', ) array ( 0 => 'tripadvisor', 1 => 'tripadvisor2', ) array ( 0 => 'google', 1 => 'google2', ) ...
0
votes
1answer
19 views

Advanced Custom Fields plugin - potential bug?

Good day, Does anyone know the solution to the following problem? I have recently set up the Advanced Custom Fields plugin with a custom post template and have been using Gravity Forms to submit ...
0
votes
1answer
40 views

using array merge into a foreach loop

I need to merge a new array of alternative information into the loop if they have the alternative information in their profile. Here's my loop: foreach ($doctor->getVars() as $k => $v) { ...
0
votes
0answers
48 views

i'm confused on how to use array merge in a foreach loop

Here's my function: function addr($dfcode) { return sql::results("select A.CODE_, case when b.id is null then a.ADDRESS1 else b.addr1 as Address1, ...
0
votes
4answers
50 views

php array merge and convert to json

I have two arrays (below). Is it possible to convert them into json string? Array ( [0] => size [1] => color ) Array ( [0] => L ...
2
votes
4answers
70 views

Merge all array to one array

i want to merge all array. This is my code: ... $j = array(); foreach($result as $document) { $d1 = $document->w; $d2 = $w; $length = sqrt(pow($d1-$d2, 2)); ...
0
votes
2answers
64 views

Merge two multidimensional associative arrays

I have these two arrays that I would like to merge together into 1 array but been having a hard time figuring out. See below for the two snippets of code: First array: $propSelectMaxRow = ...
0
votes
5answers
80 views

add the values of two different associative arrays in php . display unique key-values too in the result array [duplicate]

i need to merge two associative arrays which may or may not contain same key,if key is same the values need to added and stored in the resultant array $array1 = array( 'a' => 5, ...
-2
votes
1answer
38 views

Second value being passed in function - What is it? [closed]

I've tried looking through other places but I can't seem to find the answer. I know that a function can have more than one value being passed into it because the function itself accommodates for the ...
0
votes
1answer
40 views

Merging 2 userdefined arrays in php

I have to merge 2 arrays into one array , for that i have tried - $TotalResult = array_merge_recursive($arr1, $arr2); But I am not getting the desired result with this function. My 2 arrays are: ...

1 2 3 4 5 8
15 30 50 per page