我收到了PHP通知
未定义的偏移量:143
这是代码:
function dropdownCat($cat_id = 0, $level = 1, $settings) {
global $cPath_array, $current_category_id, $db, $cat;
$output = '';
$categoriesData = $cat->categoriesDataAll[$cat_id];
if (!$categoriesData) {
return false;
}
foreach ($categoriesData as $categories) {
...
$output .= $categories['categories_name'];
...
}
return $output;
}
输出数组的开头如下:
Array
(
[143] => Array
(
[categories_id] => 143
[categories_name] => Cat1
[parent_id] => 0
)
[416] => Array
(
[categories_id] => 416
[categories_name] => Cat2
[parent_id] => 0
)
)
为什么我会收到此PHP通知。存在所有数组变量。