初心者なので簡単な論理の質問です、回答お願いします
16進数の関数を実装したいのですが、以下のコードがエコーアウトするだけで返せません 原因が分かりません。専門家からの回答
<br /> function dwz($id,$str=""){<br /> $a=array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");<br /> $zs=(int)($id/sizeof($a));<br /> $xs=$id%sizeof($a);<br /> if($zs>=sizeof($a)){<br /> $str=$a[$xs].$str;<br /> dwz($zs,$str);<br /> }<br /> else{<br /> if($str==""){<br /> return $a[$zs].$a[$xs];<br /> }<br /> else{<br /> echo $a[$zs].$str;//这里只能输出<br /> return $a[$zs].$str;//返回没值,不知道什么原因<br /> }<br /> }<br /> }<br /> for($i=999990;$i<=1000000;$i++){<br /> echo dwz($i);<br /> echo "<br>";<br /> }<br />