get variable from included file?
<p>I have a php file. Name is never mind.<br/>
I think you will understand. But i want to use function.</p>

<p>Example.php file have a variable that reserve file name.</p>

<pre><code>&lt;?php
 $name = "abcdfg";
?&gt;
</code></pre>

<p>And my function is:</p>

<pre><code>function getData($arg)
{
require_once($arg . '.php');
//return
}
</code></pre>

<p>If i write</p>

<pre><code>&lt;?php 
echo var_dump(getData("$name"));
?&gt;
</code></pre>

<p>I need to get</p>

<pre><code>"abcdfg"
</code></pre>

<p>I'm waiting your reply..</p>
