As I said, you're not returning the result of the page($parts, $i, $array); call within the function (at line 10).

Waigani wrote:
Okay here is the modified code - no print_r no elseif, same problem - no
return. I can't see what is wrong with the recursive function??

function page($parts, $i, $array){
foreach($parts as $part){
          $page .= $part;
          }
                $array[$i] = $page;
                $i++;
                if($i < count($parts)){
                array_pop($parts);
                page($parts, $i, $array);
                }else{
                return $array;
                }
        }





Holografix wrote:

--
Jack

Reply via email to