markhuot Posted January 14, 2007 Share Posted January 14, 2007 Hello, I'm wondering if it's possible to do something like this:[code]function one(){ // ... set up variables foreach($variables as $var):}function two(){ endforeach;}[code]I'm asking because I'm building a templating engine and I'd like to be able to call the one() function to start a loop of entries, then end the loop with the two() function.[/code][/code] Link to comment https://forums.phpfreaks.com/topic/34164-control-structure-spans-functions/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.