<?php 
function gene($arr, $n, $str) {    //or gene($arr, $n, &$str)? 
    if ($n == 0) { 
        show($str);    //$str is array 
        echo "</br>"; 
         
        return 0; 
    } 
    $len = count($arr); 
    for($i=0; $i<$len; $i++) { 
        $str[$n] = $arr[$i]; 
        gene($arr, $n-1, $str); 
    } 
} function show($arr) { 
    foreach($arr as $val) 
        echo $val; 

     $arr = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');    //the letters 
$str = ''; 
gene($arr, 3, $str); 
?>这上面是一段生成字符串的代码,我想让每隔10行就输出一张图片,应该怎么写呢,谢谢