jQuery undefined variable
<blockquote>
  <p><strong>Possible Duplicate</strong>:<br>
  <a href="http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index">PHP: &quot;Notice: Undefined variable&quot;  and &quot;Notice: Undefined index&quot;</a></p>
</blockquote>

<p>external.php:</p>

<pre><code>&lt;?php echo $text; ?&gt;
</code></pre>

<p>index.php:</p>

<pre><code>&lt;?php $text = '123456'; ?&gt;

&lt;html&gt;
    &lt;head&gt;
        &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;
            function loadFile() {
                $.get("external.php", function (data) {
                    $(".frame").append(data);
                });
            }

            $(function() {
                loadFile();
            });
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;a onclick="loadFile()" href="javascript:void(0);"&gt;load&lt;/a&gt;
        &lt;div class="frame"&gt;&lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Hi guys!
I use these files and I get the following message:</p>

<p><strong>Notice: Undefined variable: text in C:\xampp\htdocs\example\external.php on line 1</strong></p>

<p>any idea???</p>
