$content = include('file2include.php');
View Single Post
06-16-2009, 05:52 AM
Join Date: Feb 2009
Well as I said it was not my code -and I changed it later on to just "include" - but you could use for something like:
We want to build an small login widget. The html code is somewhere in an extra html file, and we are currently in a class which builds the sidebar widgets.
Now we dont want to "echo" the code when it is executed since we still have some other html which goes first (<head></head><body> etc.). So we could go, copy the content in our variable - and include it anywhere in our site.
Well, it might not be the best example - but I cannot think of any better atm
My ultra secret tool for answering questions I do not know the answer to.
View Public Profile
Send a private message to Sakakuchi
Find More Posts by Sakakuchi