<?php
$alerts_array = [
[
"CustomAlertsID" => 3,
"CustomAlerts_Name" => "title demo",
"CustomAlerts_PublishDate" => "2016-07-03",
"CustomAlerts_ExpiryDate" => "2016-07-21"
]
];
$singlebtn_array = [
"button_text0" => "Button Name1only",
"button_text1" => "button name2",
"button_text2" => "button name3_new"
];
var_dump($alerts_array = array_merge($alerts_array,$singlebtn_array));
- Output for 5.6.0 - 5.6.23, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- array(4) {
[0]=>
array(4) {
["CustomAlertsID"]=>
int(3)
["CustomAlerts_Name"]=>
string(10) "title demo"
["CustomAlerts_PublishDate"]=>
string(10) "2016-07-03"
["CustomAlerts_ExpiryDate"]=>
string(10) "2016-07-21"
}
["button_text0"]=>
string(16) "Button Name1only"
["button_text1"]=>
string(12) "button name2"
["button_text2"]=>
string(16) "button name3_new"
}
preferences:
127.48 ms | 404 KiB | 225 Q