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',他得到了錯誤 –