|  | Posted by Jochem Maas on 06/10/96 11:05 
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>
  Navigation: [Reply to this message] |