> include in php ~ Online tutorial

include in php

The include() function takes all the text in a specified file and copies it into file that used the include function
Syntax
include "function name";
Example
vars.php


<?php
$color='red';
$fruit='apple';
echo $fruit."color is".$color"
?>
test.php

<?php
echo "a $color $fruit"
// include 'vars.php
include 'vars.php'
echo "a $color $fruit"
?>
Output:



Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: