professional-ajax-07-JSON-PHP-Examples-JSONPHPDecodeExample.php / php
<html> <head> <title>JSON-PHP Example</title> </head> <body> <?php require_once(<JSON.php>); sJSONText = " {\"age\":26,\"hairColor\":\"brown\",\"name\":\"Mike\",\"siblingNames\":[\"Matt\",\"Tammy\"]}"; oJSON->decode(<h3>Person Information</h3>"); print("<p>Name: ".oPerson->name."<br />"); print("Age: ".<br />"); print("Hair Color: ".oPerson->hairColor."<br />"); print("Sibling Names:</p><ul>"); for (i < count(i++) { print("<li>".i]."</li>"); } print("</ul>"); ?> </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.