Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Liviu  >  getRo  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: usage example
Class: getRo
Retrieve information about Romania's regions
Author: By
Last change:
Date: 2008-10-11 07:36
Size: 560 bytes
 

Contents

Class file image Download
<?php

require_once 'getRo.php';

$getRo = new getRo;

/**
 * Get all available counties
 */
echo '<pre>';
print_r($getRo->getCounties());
echo 
'<pre>';

/**
 * Get all available localities foreach county
 */
foreach($getRo->getCounties() as $county) {
    echo 
$county"<br />";
    
    echo 
'<pre>';
    
print_r($getRo->getLocalities($county));
    echo 
'<pre>';
}

/**
 * Count all the counties
 */
echo $getRo->countCounties();

/**
 * Count all the localities in a given county
 */
echo $getRo->countLocalities('Tulcea');