I am faced with the wonderful task of converting several ASP-based web apps to PHP. Most of the conversion is moving along smoothly, considering my PHP newbie status, though I've encountered one major snag. One of these apps relies heavily upon ASP Subroutines. 13 of them are stored in one include file, and throughout the app, any number of these subroutines are called from various pages to exectute code and return HTML. Is there any way to do something similar in PHP? Obviously funtions don't cut it, because they only return a value. I need something to execute chunks of code and return HTML. Or am I going to have to do something silly like create a separate include file for each subroutine? Even if I did that, I'd have no way to pass arguments to these include files, would I? For example, I have one subroutine which takes an argument and does one of five tasks based on the argument. Would I have to create five include files for each of the five possible tasks of this one subroutine? Thanks in advance for any advice. This is driving me nuts.
--IZA