Hi, If you search Google you'll find the codes easily but here are some of them Do you mean this code: Regards, Adam
The ONLY difference between " " and ' ' is that " " costs extra processing to parse the variables within the quotes (whether there are any or not). Read the manual. You can write the same path, with the same security, using the same variables, either way. Always use ' ' when you can.
You could also use require_once('file.php'). Require is different because if the require fails, the page will not load (it literally requires the file to load so if there is an error it wont load the page with the error)
<html> <body> <?php include 'header.php'; ?> <h1>Welcome to my home page!</h1> <p>Some text.</p> </body> </html> For More information visit my website to learn about php.
require_once() does an include(). If the file can't be included (it's not there, it can't be read, etc.), the script throws an error and stops. The difference between require() and require_once() is that if you have require() twice in one script, the included file will be included twice, with require_once() it will only be included the first time. As far as efficiency, they're all include(), but include_once(), require() and require_once() have additional code.