Jump to content

smarty_pockets

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

smarty_pockets's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. WOW!!! That worked! Damn you copy paste! Thanks a LOTT kenrbnsn! I really appreciate the help.  :)
  2. I tried that too. I copied just this portion of code and made a new php file, and still got the error below: Parse error: parse error, unexpected T_VARIABLE in /mnt/w0701/d01/s49/b0286312/www/redhutdesigns.com/Projects/TrackThisNote/test.php on line 5
  3. I'm new to PHP (but not new to programming), so I'm pretty sure I'm missing something really trivial in the code below. When I try to run it, I get a parse error on the first line inside the function. Any help would be hugely appreciated. Thanks!! [code] function distancer($lat1,$lon1,$lat2,$lon2,$unit) {   $theta = $lon1 - $lon2;   $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) +  cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));   $dist = acos($dist);   $dist = rad2deg($dist);   $miles = $dist * 60 * 1.1515;   switch (strtoupper($unit)) {    case 'K': $ret = $miles * 1.609344; break; case 'N': $ret = $miles * 0.8684; break; default: $ret = $miles;   }   return $ret; }[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.