Jochem Maas wrote:
Tom wrote:

<snip>

Sorry Tom, I hit the send button too early!
I mean to add some context to the code below so you would (hopefully)
understand what I mean:


OR define the function outside of the class e.g.

function aFunction($value, $key)
{
global $aReturnString; $aReturnString = $aReturnString.$value;
}



...was meant to be:

function aFunction($value, $key)
{
    global $aReturnString;
    $aReturnString = $aReturnString.$value;
}

class aClass
{
    some other stuff, constructor etc
   public function aPublicFunction($anArray)
   {
      global $aRetrunString;
           function aFunction($value, $key)
      {
           global $aReturnString;
           $aReturnString = $aReturnString.$value;               }

      array_walk($anArray,'aFunction');
      return $aReturnString;
   }

   // rest of the class definition goes here...

        
<snip>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to