Q:

How to Pass data from PHP to PHP file

I have a File named 1.php and I have another file named index.php
I use 
include('index.php');

for including index data. Is there a way i can pass data to index.php file?

A:

if index.php is inside 1.php , you can do that:
1.php: 
<?php $variable = "hello"; 
      include('index.php');
?>

index.php
<?php 
echo $variable; //this will output hello.
?>

