Articles → PHP → Include Statement In PhpInclude Statement In PhpIn this article, we will discuss the "include" statement in PHP.Purpose The "Include" statement is used to include the file in another file. Mainly, the "include" statement is used to include the header and footer in every file.Scenario In this example, we have a PHP file "home.php".Click to EnlargeWe require to include a header on the home page. Code First, we will create a new file "header.html" and add the following code: -Click to EnlargeNow, add the "include" statement in the "home.php".Click to EnlargeOutput Click to EnlargePosted By - Karan Gupta Posted On - Thursday, July 30, 2020 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
Query/Feedback