•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,572 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,779 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Example of using INCLUDE to show a nav bar. For beginners. Simply uses include to show an external file (in this case, nav.php) and that's it! You can also include this in another page with a CSS style. The CSS will be automatically included in formatting the INCLUDEd page!
<?php include("navigation.php"); ?>
Comments (Newest First)
cscgal | The Queen of DaniWeb | Jun 13th, 2006
•
•
•
•
If you're goal is to deal with output, you may find that using ob_ is more flexible, as it lets you retrieve the output from external files and store them in variables for later use.
The syntax would be:
There are also a whole bunch of other ob_ functions. Check the php.net manual for more information.
The syntax would be:
php Syntax (Toggle Plain Text)
<?php ob_start(); $output = ob_get_contents(); ob_end_clean(); ?>
There are also a whole bunch of other ob_ functions. Check the php.net manual for more information.
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)