$inAr = array("Dave" => 24, "Edd" => 45, "Joe" => 37, "Fred" => 27);
print "This is the input data:<br/><pre>";
-foreach($inAr as $key => $val) {
+foreach ($inAr as $key => $val) {
print $key . ", " . $val . "\n";
}
print "</pre>";
print "The server gave me these results:<pre>";
$value = $resp->value();
foreach ($value as $struct) {
- $name = $struct->structmem("name");
- $age = $struct->structmem("age");
+ $name = $struct["name"];
+ $age = $struct["age"];
print htmlspecialchars($name->scalarval()) . ", " . htmlspecialchars($age->scalarval()) . "\n";
}