Using include() to Execute PHP and Assign the Return Value : Include : Language Basics PHP Source Code


PHP Source Code » Language Basics » Include »

 

Using include() to Execute PHP and Assign the Return Value







<html>
<head>
<title>Using include() to execute PHP and assign the return value</title>
</head>
<body>
<?php
    $addResult = include("myIncludeFileWithReturnValue.php");
    print "The include file returned $addResult";
?>
</body>
</html>

<!-- myIncludeFileWithReturnValue.php
<?php
$retval = );
return $retval;
?>
-->

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Include