Skip to main content
1 vote
1 answer
52 views

I want to combine two associative arrays with different amount of keys and keep all the keys in the final array even if they are null or empty I have tried array_merge but the keys that are not ...
Jalagui's user avatar
  • 35
1 vote
4 answers
114 views

Is there a shorthand for the following code: $result = array_combine( array_map(fn($elem) => "key_$elem", $array), array_map(fn($elem) => "value_$elem", $array) ); ...
plsssineedheeeelp's user avatar
-1 votes
3 answers
40 views

There are two arrays that One is the correct answers and the other is the user's answer. My Php: $i=1; $correct = array('a','d','c','a','b','c'); $user = array('a','c','c','a','c','c'); foreach (...
behroz's user avatar
  • 126
-1 votes
1 answer
59 views

I've an array of arrays in which I've 2 values in each array first one is personID and second one is Skill, there are multiple skills of same persons I need all same skills to add in an array with ...
Rashid's user avatar
  • 286
0 votes
2 answers
37 views

I have 2 Array: $arr1 = Array ( [2] => Array ( [0] => 41000 [1] => 31079 ) [3] => Array ( [0] => 42963 [1] => 41189 ) ) $arr2 = Array ( [2] => ...
Noer Herinnanda Putra's user avatar
-1 votes
2 answers
138 views

Here is my array , I need to loop through this array and check if objects with same docId exists and if they do, I have to combine jArray of these objects FinalArray = [ { "jArray&...
aki's user avatar
  • 315
1 vote
1 answer
44 views

i have an output like this: [ { GolonganName: '3B - Niaga Besar', data: [ 172000 ] }, { GolonganName: '3A - Niaga Kecil', data: [ 76700 ] }, { GolonganName: '2B - Rumah Tangga Menengah', data: [ ...
Fahri Abdurrachman's user avatar
0 votes
1 answer
213 views

I have an object as below, {"metaData":[{"name":"a"},{"name":"b"}],"rows":[[1,2],[3,4],[5,6]]} I would like to change it to [["a"=...
Wahsei's user avatar
  • 307
0 votes
0 answers
40 views

I combined 2 objects as below, but I don't want the keys to be in the output I get. $link1 = '{"Success":true,"Result":[{"eventId":650810,"sportId":"2"...
ThePro's user avatar
  • 31
0 votes
1 answer
2k views

I need to analyze some data taken in my lab but it goes beyond my limited programming skills. I have multiple sets of similar data and I need to take the average of all of these and plot that with ...
Rachel Fister's user avatar
-2 votes
1 answer
158 views

I have two arrays with keys and values and i want to combine them: Array 1 [0]=>string "Width" [1]=>string "Height" [2]=>string "Length" [3]=>string "...
w2God's user avatar
  • 19
0 votes
2 answers
64 views

I have multiple arrays structured like these: $array1 = ["aaa" => 1, "bbb" => 1]; $array2 = ["aaa" => 12, "bbb" => 12]; $array3 = ["bbb" =&...
Lou Nik's user avatar
  • 125
1 vote
2 answers
398 views

I'm trying to combine 2 rows with the same identity. I've been looking for a solution, but somehow can't find a working solution. I'm trying to make a tracker for my stocks, but I want it to combine ...
Osman P.'s user avatar
-2 votes
2 answers
173 views

Problem i have two multidimensional arrays that look like this, 1st Array array( [0] => Array ( [course_id] => 10 [topic] => Booda-hood, advice and an important ...
Atif Raja's user avatar
0 votes
2 answers
420 views

I want to combine data only if value is exist. example: // array 1 array:4 [▼ 0 => "qwfd" 1 => "qw2e3" 2 => null 3 => null ] // array 2 array:4 [▼ 0 => &...
mafortis's user avatar
  • 7,188

15 30 50 per page