0
我有一个使用php mysql的动态树视图的代码。使用php创建动态树
function fetchCategoryTreeList($parent = '', $user_tree_array = '')
{
// code here
}
我只是想......喜欢。我有一个变量
$top = '1234';
现在怎么把这个功能就像
function fetchCategoryTreeList($parent = $top, $user_tree_array = '')
{
// code here
}
,如果我把$顶部,这个功能的话,我得到了致命的错误。请帮我
仅通过添加$ top ='1234'就不会产生致命错误;进入功能。我们需要您真实的代码来查看问题。 –
您不能将默认值设置为另一个变量。 –
@PierreGranger由于函数参数中的'$ parent = $ top',他得到了错误 –