Addressed to: "Andrew" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Andrew" <[EMAIL PROTECTED]> Tue, 30 Jan 2001 10:17:40 +0200
>
> Hi, Does PHP4 support recursive function ivocation? It seemed tome
> that it does not, because the code below doesn't work properly.


Yes, PHP does support recursion.  I don't understand what you are
trying to do.  How about including an example of what comes in $arr
when the function is called, what $this->$deptree has to do with
anything and what you want the output to look like.

I'm not big on OOP, but  $this->$deptree does not look right. Also
usually when I see a recursive function the values passed to the
function when it calls itself are derived from the values passed when
it was first called.


> function RecPrintDeps($arr, $depth=0){
>    //print_r($arr);
>    $depth++;
>     printf("<H$depth><a href=\"%s?dep=%s\">%s</a></H$depth>",
$HTTP_SELF, $arr[0], $arr[2]);
>     while(list($k,$v)=each($this->$deptree)){
>         if($v[1]==$arr[0])
>         $this->RecPrintDeps($v,$depth);
>     }
> }




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to