I was trying to get variable value from a page and echo it out in another page
for example I have 2 pages pg1.php
and pg2.php
:
On pg2.php I have:
<?php
$vr = "Hello";
?>
Now I want to echo this out on pg1.php, I have tried this:
<?php
require "pg2.php";
echo $vr;
?>
It works, but the problem is whatever else I have on pg2.php will be displayed on pg1.php.