return value from recursive function

From: Date: Mon, 30 Jul 2001 00:46:35 +0000
Subject: return value from recursive function
Groups: php.general 
Request: Send a blank email to php-general+get-60097@lists.php.net to get a copy of this message
Hi, How to get return value from a recursive function .. here is the test code which I was trying <? function abc_recurse() { static $i = 1; echo $i; $i++; if ($i == 4) return ("xyz"); abc_recurse(); } $returnvalue = abc_recurse(); echo $returnvalue; ?> Its printing "123" where as I was expecting "123xyz" what is happening to $returnvalue TIA Jaski

« previous php.general (#60097) next »