Add php files
This commit is contained in:
20
modules/EcmCommunes/parser.php
Normal file
20
modules/EcmCommunes/parser.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
$xmlstring=file_get_contents('modules/EcmCommunes/TERC.xml');
|
||||
|
||||
$xml = simplexml_load_string($xmlstring);
|
||||
$powiaty=array();
|
||||
echo "<pre>";
|
||||
foreach ($xml->catalog->row as $row){
|
||||
// kod powiat $row->col[5]
|
||||
if(substr($row->col[5],0,5)=='gmina'){
|
||||
$powiaty[]=$row->col[4];
|
||||
}
|
||||
// nazwa powiatu $row->col[4]
|
||||
}
|
||||
echo " var availableTags = [<br>";
|
||||
$powiaty=array_unique($powiaty);
|
||||
foreach ($powiaty as $powiat){
|
||||
echo '"'.$powiat.'",<br>';
|
||||
}
|
||||
echo '];';
|
||||
?>
|
||||
Reference in New Issue
Block a user