pass values using header in php
<p>1.php</p>

<pre><code>&lt;?php

header( 'Location: 4.php?$x=1&amp;y=2&amp;z=3' );

?&gt;  
</code></pre>

<p>sends the value of x ,y ,z</p>

<p>4.php  </p>

<pre><code>&lt;?php
 print '&lt;pre&gt;';
$a= $_GET ;
echo $a[x];
print '&lt;/pre&gt;';

?&gt;
</code></pre>

<p>when we call 1.php it is redirected to 4.php<br>
it displays the value of x correct but it gives error  </p>

<blockquote>
  <p>Notice: Use of undefined constant x - assumed 'x' in C:\wamp\www\4.php on line 6</p>
</blockquote>

<p>why it gives error ?</p>
