close
一開始這樣寫,但出問題
function trim_dom_node($string){
$string=str_replace(" <","<",$string,$count);
echo "com ";
if($count >= 1)
{
trim_dom_node($string);
}
else {return str_replace("\n<","<",$string);}
}
改成這樣,呼叫function 加上 return
function trim_dom_node($string){
$string=str_replace(" <","<",$string,$count);
echo "com ";
if($count >= 1)
{
return trim_dom_node($string);
}
else {return str_replace("\n<","<",$string);}
}
全站熱搜
留言列表