Q:

Converting earth kilometers to radians in php

I'm trying to convert earth kilometers to radians.  I know this question has been answered else where but all those answers does not seem to answer properly. 
what i have done so far is:
$radians = $km / 6371; // 6371 is the radius of earth in Km

is this correct?  or do i have to use meters ? 

A:

It is right.  
"Earth radius is the distance from Earth's center to its surface, about 6,371 kilometers (3,959 mi).  This length is also used as a unit of distance, especially in astronomy and geology, where it is usually denoted by R⊕ (R_\oplus)." 
http://en.wikipedia.org/wiki/Earth_radius

