http://qs1969.pair.com?node_id=1126547


in reply to How to extent the scope of local variable outside block??

Declare the variable outside the foreach loop, then you can access it it outside the loop.