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