php4 question.

    Date: 09/23/06 (PHP Development)    Keywords: php, xml

    ok, so I am going to start with, this is a php4 based machine and I can't upgrade to 5 so I need a php4 solution.

    I have some XML that I am parsing and creating an array object out of. a var_dump of the object gives me this.

     
    object(stdClass)(1) {
      ["voucher"]=>
      array(1) {
        [0]=>
        &object(stdClass)(5) {
          ["action"]=>
          array(1) {
            [0]=>
            string(6) "create"
          }
          ["partnerid"]=>
          array(1) {
            [0]=>
            string(4) "testing"
          }
          ["partnerkey"]=>
          array(1) {
            [0]=>
            string(4) "testing"
          }
          ["timestamp"]=>
          array(1) {
            [0]=>
            string(19) "2006-09-21 00:00:00"
          }
       }
    }
    


    This is the deal. I want to add to this list, but I am not sure how to do it. I am parsing using the XmlC class example from php.net I want to add a [errors] object with a few sub object (which will all be turned back into XML string afterwards and returned to the end users). I am not sure how to programmatically add this. Help please..

    [edit]: I should add more information. I want to add [errors] to the same level as [timestamp] in the same object without having to rebuild the object.

    Source: http://community.livejournal.com/php_dev/72305.html

« minimum number of queries? || Вакансия:... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home