Jump to content

Foreach exiting variable in a block...do


flaab

Recommended Posts

Hi

 

I've a little problem. We can iterate an array or a hash doing something right? Well...what I need is something similar but with all the defined variables within my Scope.

 

A little pseudocode example..

 

class foo extends whatever {

     public function doSome()
     {
             /* lots of variable declaration and assignation */
            foreach(Declared_variable_in_my_scope as $name => $value)
                     do something with it
           }
     }
}

 

Is there any way to do this?

 

Thx!

Link to comment
https://forums.phpfreaks.com/topic/75471-foreach-exiting-variable-in-a-blockdo/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.