And we can do that the other way around too:


<?php
$jebLon 
45.74;
$jebLat = -47.11;
$lon decimal_to_dms($jebLon"longitude");
$lat decimal_to_dms($jebLat"latitude");
echo 
"{$lon['degrees']}°{$lon['minutes']}{$lon['seconds']}{$lon['direction']}\n";
echo 
"{$lat['degrees']}°{$lat['minutes']}{$lat['seconds']}{$lat['direction']}\n";
?>
Output