append an array to another array php code example
Example 1: php append to array
$myArr = [1, 2, 3, 4];
array_push($myArr, 5, 8);
print_r($myArr);
$myArr[] = -1;
print_r($myArr);
Example 2: php add to array
$fruits = ["apple", "banana"];
array_push($fruits, "orange");
$fruits[] = "orange";
Example 3: how to append one array to another array in php
((data.userDetails.profile_picture === null) ||(data.userDetails.profile_picture===undefined))? picture ='<div><img src="http://commondatastorage.googleapis.com/codeskulptor-assets/lathrop/nebula_brown.png"' :
picture = '<img src="'+data.userDetails.profile_picture+ '"/>';