Let $X$ be a topological space. A subset of $C(X)$, the space of continuous real-valued functions on $X$, is a partially ordered set in the pointwise order. Suppose that $X$ and $Y$ are topological spaces, and $A(X)$ and $A(Y)$ are subsets of $C(X)$ and $C(Y)$ respectively. We consider the general problem of characterizing the order isomorphisms (order preserving bijections) between $A(X)$ and $A(Y)$. Under some general assumptions on $A(X)$ and $A(Y)$, and when $X$ and $Y$ are compact Hausdorff, it is shown that existence of an order isomorphism between $A(X)$ and $A(Y)$ gives rise to an associated homeomorphism between $X$ and $Y$. This generalizes a classical result of Kaplansky concerning linear order isomorphisms between $C(X)$ and $C(Y)$ for compact Hausdorff $X$ and $Y$. The class of near vector lattices is introduced in order to extend the result further to noncompact spaces $X$ and $Y$. The main applications lie in the case when $X$ and $Y$ are metric spaces. Looking at spaces of uniformly continuous functions, Lipschitz functions, little Lipschitz functions, spaces of differentiable functions, and the bounded, local and bounded local