note 1972 modified in ref.wddx by yannick

From: Date: Fri, 25 Jul 2008 16:56:19 +0000
Subject: note 1972 modified in ref.wddx by yannick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142706@lists.php.net to get a copy of this message
Since there aren't any examples of reversing the process, here's one. If you had the packet produced by the above example (without the htmlentities() call), you could retrieve the values like this: <?php $value = wddx_deserialize($packet); print "pi is:<br>" . $value["pi"] . "<p>\n"; print "cities is:<br>\n"; while (list($key, $val) = each($value["cities"])) { print "$key => $val<br>\n"; } ?> which outputs: <pre> pi is: 3.1415926 cities is: 0 => Austin 1 => Novato 2 => Seattle </pre> --was-- Since there aren't any examples of reversing the process, here's one. If you had the packet produced by the above example (without the htmlentities() call), you could retrieve the values like this: <pre> $value = wddx_deserialize($packet); print "pi is:<br>" . $value["pi"] . "<p>\n"; print "cities is:<br>\n"; while (list($key, $val) = each($value["cities"])) { print "$key => $val<br>\n"; } </pre> which outputs: <pre> pi is: 3.1415926 cities is: 0 => Austin 1 => Novato 2 => Seattle </pre> http://php.net/manual/en/ref.wddx.php

« previous php.notes (#142706) next »