getting a variable from a function

From: Date: Tue, 10 May 2005 08:36:40 +0000
Subject: getting a variable from a function
Groups: php.db 
Request: Send a blank email to php-db+get-39405@lists.php.net to get a copy of this message
As against 'global', is there anyway to get a variable from wthin a function (besides 'returning it using 'return'). for example, how do i get the value of the variable $c in the function below: function Dis() { $a = arry('foo', 'bar'); foreach ($a as $v) { echo $v; } $c = count($a); } --------------------------------- A passion till tomorrow, Opeyemi Obembe | ng.clawz.com --------------------------------- Yahoo! Mail Stay connected, organized, and protected. Take the tour

« previous php.db (#39405) next »