PHP: passing Arrays from server to client not working!

Vvcwaaju

New Member
The server Contents are server.php:\[code\]<?php $err["foo"]="bar";?>\[/code\]The client.php\[code\]<?phprequire 'server.php';echo "<p> Server says: $err['foo']</p>";?>\[/code\]But,This code works :The new server Contents are server.php:\[code\]<?php $err["foo"]="bar";$errAssign=$err["foo"];?>\[/code\]The client.php\[code\]<?phprequire 'server.php';echo "<p> Server says: $errAssign</p>";?>\[/code\]Why am i not able to get the contents of the array from the server ?Tried the following in the client.php\[code\] echo "<p> Server says: $err[\'foo\']</p>"; echo "<p> Server says: $err[\"foo\"]</p>"; echo "<p> Server says: $err[foo]</p>";\[/code\]None of which are working!!.. please help !!
 
Top