Home > Article > CMS Tutorial > How does PHPCMS determine whether the column contains sub-columns?
PHPCMS How to determine whether this column contains sub-columns?
1. Directly determine "child" in the data of this column. If it is true, it contains sub-columns;
if ($cate['child']) { echo "有子栏目"; } else { echo "没有子栏目"; }
2. First determine whether the data exists, and if it exists, then determine whether Is empty, if both are true, it contains sub-columns.
if (isset($cate['child']) && !empty($cate['child'])) { echo "有子栏目"; } else { echo "没有子栏目"; }
Recommended tutorial: "PHPCMS Tutorial"
The above is the detailed content of How does PHPCMS determine whether the column contains sub-columns?. For more information, please follow other related articles on the PHP Chinese website!