Login   Register  
PHP Classes
elePHPant
Icontem

File: generation-example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sandeep.C.R  >  crXml  >  generation-example.php  >  Download  
File: generation-example.php
Role: Example script
Content type: text/plain
Description: Example to illustrate XML generation
Class: crXml
Manipulate XML documents as array
Author: By
Last change: added header output
Date: 2011-02-11 12:28
Size: 410 bytes
 

Contents

Class file image Download
<?php

include 'crXml.php';

$xml = new crXml();

$year $xml->year;

foreach(
range(1,12) as $m)

{

      
$year->month[$m-1]->noOfDays =      date('t',mktime(0,0,0,$m,$m,2000));

      
$year->month[$m-1]->shortName date('M',mktime(0,0,0,$m,$m,2000));

      
$year->month[$m-1]['name']=date('F',mktime(0,0,0,$m,$m,2000));

 

}
header("Content-Type:text/xml"); 
echo 
$xml->xml();

?>