<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 = ( 4 + 4 );
return $retval;
?>
-->
|