topical media & game development 
  
 
 
 
 
  
    
    
  
 professional-ajax-07-JSON-PHP-Examples-JSONPHPEncodeExample.php / php
  <html>
      <head>
          <title>JSON-PHP Example</title>
      </head>
      <body>
  <?php 
      class Person {
      
          var hairColor;
          var siblingNames;
          
          function Person(age, this->name = this->age = this->hairColor = this->siblingNames = array();
          }    
      }
  ?>
  <?php 
      require_once(<JSON.php>);
      oPerson = new Person("Mike", 26, "brown");
      oPerson->siblingNames[1] = "Tammy";
  
      oJSON->encode(sOutput);
  ?>            
      </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.