Public feed #723543

Anonym

public text v1 · immutable
Raw Edit
·published 2007-10-02 21:17 UTC
rendered paste body
    function Write($udtData)
    {
      if (gettype($udtData) != "array") {fputs($this->Handle, "<".substr(get_class($udtData),3).">\n");}
    
      foreach ($udtData as $property => $value)
      {
        if (gettype($value) != "object" && gettype($value) != "array")
          fputs($this->Handle, "<{$property}>{$value}</{$property}>\n");
        else
          $this->Write($value);
      }
      
      if (gettype($udtData) != "array") {fputs($this->Handle, "</".substr(get_class($udtData),3).">\n");}
    }