0
echo $existing_data;
echo $current_data;
array_merge($existing_data->original, $current_data->original);
array_merge($existing_data->large, $current_data->large);
array_merge($existing_data->small, $current_data->small);
echo $existing_data;
的輸出是:無法合併2個陣列
"existing": {
"original": [],
"small": [],
"large": [],
"preview": {
"name": "",
"path": "",
"reference": ""
}
}
"current": {
"original": [
{
"name": "TQT_82560100_1385618474_9480",
"created_timestamp": "2013-11-28 06:01:14",
}
],
"small": [
{
"name": "TQT_82560100_1385618474_9480_small",
"created_timestamp": "2013-11-28 06:01:15",
}a
],
"large": [
{
"name": "TQT_82560100_1385618474_9480_large",
"created_timestamp": "2013-11-28 06:01:15",
}
],
"preview": {
"name": "TQT_82560100_1385618474_9480_prev",
"path": "images/",
"reference": 0,
"width": 137,
"height": 137
}
}
"existing": {
"original": [],
"small": [],
"large": [],
"preview": {
"name": "",
"path": "",
"reference": ""
}
}
我試圖array_merge_recursive()
太。但結果相同。