PHP undefined index:xxxxxxx 解决方式
php数组取参时,有时候会用到未定义的参数,如果取参前不加判断就会报如下的错:
undefined index:xxxxxxx
遇到这种情况,可以在取参前加如下一段代码:
$row['way'] = !empty($row['way'])?$row['way']:null;
PHP undefined index:xxxxxxx 解决方式
php数组取参时,有时候会用到未定义的参数,如果取参前不加判断就会报如下的错:
undefined index:xxxxxxx
遇到这种情况,可以在取参前加如下一段代码:
$row['way'] = !empty($row['way'])?$row['way']:null;