Aronaman
4 months ago
292
3
Laravel

merging two object

Posted 4 months ago by Aronaman
// two object 
$individual ={33 : "203"};
$random={11: "760", 32: "102"}
$result=$individual->merge($random);
//my result response
0 : "760"
1 : "102"
2 : "203"

how can I achieve this ??? is there another method? beside merge

$result={11:"760", 32:"102", 33: "203"};

Please sign in or create an account to participate in this conversation.