Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Eugene Panin  >  Parser  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Usage example
Class: Parser
Author: By
Last change:
Date: 14 years ago
Size: 576 bytes
 

Contents

Class file image Download
<html>
<body bgcolor=white>
<?
require('Parser.php');

$parser = new Parser('sample.cfg');
if (
$parser->error()) {
        echo 
"Error: ".$parser->error()."<p>";
}

$s_list $parser->sections();
while (list(
$key,$sec_name)=each($s_list)) {
        
$p_list $parser->parameters($sec_name);
        echo 
"$sec_name";
        echo 
"<ul>";
        while (list(
$key,$par_name)=each($p_list)) {
                
$val $parser->param($sec_name,$par_name);
                echo 
"$par_name => $val<br>";
        }
        echo 
"</ul>";
}


?>
</body>
</html>