recursion

From: Date: Tue, 30 Jan 2001 08:17:40 +0000
Subject: recursion
Groups: php.db 
Request: Send a blank email to php-db+get-6251@lists.php.net to get a copy of this message
Hi, Does PHP4 support recursive function ivocation? It seemed tome that it does not, because the code below doesn't work properly. 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); } } The function is a member of a class. Regards, Andrew Kozachenko Programmer Ukraine International Airlines

« previous php.db (#6251) next »