PHP and code-behind pages

jsn

Registered
Hi all

is there a way to code pages in PHP with the concept of code-behind like in ASP.NET ?

Thanks
jsn
 
You can code in a style that separates content from logic, but PHP has no built-in provisions for making a HTML page programmatically accessible the way ASP does. For the record, ASP code-behind does use separate files for HTML UI and logic, and ASP uses custom HTML extensions to signify which parts of the page, such as text labels and form fields, are accessible from code.
 
Since you already know about code-behind, try applying it to PHP - make a file full of variables or whatever which contain portions of your page's content. Then make another file of PHP code which creates a complete web page from those variables.
 
anarchie said:
make a file full of variables or whatever which contain portions of your page's content. Then make another file of PHP code which creates a complete web page from those variables.
I think I understand what you are talking about, but are talking about having a variable for just about every tag or just chunks of html?
 
Back
Top