更新时间:2023-11-26 18:16:52
检查数组是否首先存在,如果不存在,则创建它...然后添加元素,知道该数组肯定会在之前定义手:
Check if the array exists first, and if it doesn't, create it...then add the element, knowing that the array will surely be defined before hand :
if (!isset($myArray)) {
$myArray = array();
}
array_push($myArray, 'my message');