PHP提示:Array callback has to contain indices 0 and 1错误的原因及解决办法

admin 阅读:158 2024-03-04

php提示:Array callback has to contain indices 0 and 1错误是因为我们使用了错误的括号来访问数组元素。

比如下面的错误示例是使用了小括号来访问数组元素,我们改成php规定的中括号即可。

$begin_date = $input('begin_date');//错误
$begin_date = $input['begin_date'];//正确
声明

1、部分文章来源于网络,仅作为参考。
2、如果网站中图片和文字侵犯了您的版权,请联系1943759704@qq.com处理!