使用PHP转换经度和纬度以查找北距和东距值

使用PHP转换经度和纬度以查找北距和东距值,php,Php,我有一个循环,为每个客户机提供一个经度和纬度,我正在寻找一个函数,在这个函数中,我可以将这些变量传递到其中,它将找出北距和东距值 我试过gPoint课程,但没有乐趣 Foreach ($clients as $client) { $client[lat]; $client[lon;]; Function convert($lat,$long) } PHP中没有本机函数可以帮助您。但是你可以用这个: 例如: <?php $gpoint = new gPoint();

我有一个循环,为每个客户机提供一个经度和纬度,我正在寻找一个函数,在这个函数中,我可以将这些变量传递到其中,它将找出北距和东距值

我试过gPoint课程,但没有乐趣

Foreach ($clients as $client)
{
    $client[lat];
    $client[lon;];
    Function convert($lat,$long)
}

PHP中没有本机函数可以帮助您。但是你可以用这个:

例如:

<?php
$gpoint = new gPoint();
$gpoint->setLatLong($lat,$long);
$gpoint->convertLLtoLCC();

echo 'Northing and easting value: '. $gpoint->lccN() . ' ' . $gpoint->lccE();

这似乎不是编写php代码的正确方法。没有分号?foreach内部的函数引用?为什么。