- Posts: 131
- Thank you received: 0
5.247852,45.948694,0 5.250479,45.94199999999999,0 5.25393,45.936416,0 5.250012,45.932092,0 5.263268,45.928917,0 5.269832,45.933186
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
5.247852,45.948694,0 5.250479,45.94199999999999,0 5.25393,45.936416,0 5.250012,45.932092,0 5.263268,45.928917,0 5.269832,45.933186,0 5.281496,45.94429399999999,0 5.284316,45.943719,0 5.287275,45.94842100000001,0 5.292569,45.949301,0 5.296876,45.947698,0 5.30193,45.947695,0 5.305275,45.94978900000001,0 5.310326,45.94805000000001,0 5.309256,45.942375,0 5.311869,45.93485500000001,0 5.31663,45.934974,0 5.317879,45.93231899999999,0 5.3156,45.928622,0 5.322747,45.922551,0 5.331854,45.924598,0 5.332367,45.921491,0 5.34307,45.92279,0
45.948694,5.247852;45.94199999999999,5.250479;45.936416,5.25393;45.932092,5.250012;45.928917,5.263268;45.933186,5.269832;45.94429399999999,5.281496;45.943719,5.284316;45.94842100000001,5.287275;45.949301,5.292569;45.947698,5.296876;45.947695,5.30193;45.94978900000001,5.305275;45.94805000000001,5.310326;45.942375,5.309256;45.93485500000001,5.311869;45.934974,5.31663;45.93231899999999,5.317879;45.928622,5.3156;45.922551,5.322747;45.924598,5.331854;45.921491,5.332367;45.92279,5.34307;45.921521,5.351634;45.919492,5.359126
<?php
$monfichier = fopen('zonekml.txt', 'r+');
$contenu = fgets($monfichier);
$trait = explode(",",$contenu);
//i put the value in a text file as this is only for me and one time. Best should be to have a field to fill the values.
//Now reorganise the value to have something working
for ($i=0;$i<count($trait)-2;$i+=2) {
echo $trait[$i+1];
echo ',';
if (substr($trait[$i], 0, 1)=='0') {
echo substr($trait[$i], 2, strlen($trait[$i])-2);
} else {
echo $trait[$i];
}
if ($i<(count($trait)-3)) {echo ';';}
}
//closing the file
fclose($monfichier);
?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
© 2011- Жук Це-Це. Design by Dmitry Zhuk