PHP: passing Arrays from server to client not working!
<p>The server Contents are server.php:</p>

<pre><code>&lt;?php 
$err["foo"]="bar";
?&gt;
</code></pre>

<p>The client.php</p>

<pre><code>&lt;?php
require 'server.php';
echo "&lt;p&gt; Server says: $err['foo']&lt;/p&gt;";
?&gt;
</code></pre>

<p>But,This code works :
The new server Contents are server.php:</p>

<pre><code>&lt;?php 
$err["foo"]="bar";
$errAssign=$err["foo"];
?&gt;
</code></pre>

<p>The client.php</p>

<pre><code>&lt;?php
require 'server.php';
echo "&lt;p&gt; Server says: $errAssign&lt;/p&gt;";
?&gt;
</code></pre>

<p>Why am i not able to get the contents of the array from the server ?</p>

<p>Tried the following in the client.php</p>

<pre><code> echo "&lt;p&gt; Server says: $err[\'foo\']&lt;/p&gt;";
 echo "&lt;p&gt; Server says: $err[\"foo\"]&lt;/p&gt;";
 echo "&lt;p&gt; Server says: $err[foo]&lt;/p&gt;";
</code></pre>

<p>None of which are working!!.. please help !!</p>
