Warning: array_push() expects parameter 1 to be array

前端 未结 4 968
北海茫月
北海茫月 2021-02-06 06:17

This is my code, and when I run this function I get this :Warning: array_push() expects parameter 1 to be array However I define $printed as an array

4条回答
  •  甜味超标
    2021-02-06 06:47

    You need validate whit is_array:

    Example

    if (is_array($arNumbers)) {
        $cellid =  array_push($arNumbers, 0);
    }
    

提交回复
热议问题