git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up old-API code
[plcapi.git]
/
demo
/
client
/
agesort.php
diff --git
a/demo/client/agesort.php
b/demo/client/agesort.php
index
7f870c6
..
90622d2
100644
(file)
--- a/
demo/client/agesort.php
+++ b/
demo/client/agesort.php
@@
-49,11
+49,9
@@
$resp = $client->send($req);
if (!$resp->faultCode()) {
print "The server gave me these results:<pre>";
$value = $resp->value();
if (!$resp->faultCode()) {
print "The server gave me these results:<pre>";
$value = $resp->value();
- $max = $value->arraysize();
- for ($i = 0; $i < $max; $i++) {
- $struct = $value->arraymem($i);
- $name = $struct->structmem("name");
- $age = $struct->structmem("age");
+ foreach ($value as $struct) {
+ $name = $struct["name"];
+ $age = $struct["age"];
print htmlspecialchars($name->scalarval()) . ", " . htmlspecialchars($age->scalarval()) . "\n";
}
print htmlspecialchars($name->scalarval()) . ", " . htmlspecialchars($age->scalarval()) . "\n";
}