Quote we say two one is a variable reference is a file include reference,
The include () or require () function allows you to insert the contents of a file in a file before the server executes the PHP tutorial file. In addition to the way they handle errors, the two functions are identical in other ways. The Include () function generates a warning (but the script continues to execute), and the Require () function generates a fatal error (fatal error) (the script stops executing after the error occurs).
<?php include ("header.php");?>
<p>some text</p>
Three files, "default.php", "about.php", and "contact.php" all refer to the "menu.php" file. This is the code in "default.php":
<?php include ("menu.php");?>
<p>some text</p>
</body>
PHP reference (is to precede the variable or function, object, etc. with & symbol)
References in PHP mean that different names access the same variable content.
There is a difference between the pointers in the C language. The pointer in C language stores the address of the variable's contents in memory
References to variables
PHP references allow you to use two variables to point to the same content
[PHP]
?
$a = "ABC";
$b =& $a;
echo $a//here output: ABC
echo $b//HERE output: ABC
$b = "EFG";
echo $a//The value of $a here becomes EFG so output EFG
echo $b//Here output EFG
?>
[/php]