2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by karthik_ppts
0

Yes. This is the code

<?php 
$brng=$rs['degree'];
$bearings = array("NE", "E", "SE", "S", "SW", "W", "NW", "N");

$index = $brng - 22.5;
if ($index < 0)
$index += 360;
$index = (int)($index / 45);
echo "Towards ".$bearings[$index];
?>

Edited by karthik_ppts: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.