⊗ppPmFSIc 351 of 447 menu

Inserting Files in PHP

Let's say we have one file:

<?php echo 'index'; ?>

Let's also say there is a second file:

<?php echo 'test'; ?>

Let's insert the contents of the second file into the first one. This is done using the include operator:

<?php include 'test.php'; echo 'index'; ?>

The same file can be inserted any number of times:

<?php include 'test.php'; include 'test.php'; include 'test.php'; echo 'index'; ?>

Create files file1.php, file2.php, file3.php. Include them in your main file.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline