Suppose h : (0,1)-> satisfies the following conditions:

for all x Э (0,1) there exists d>0 s.t. for all x' Э (x, x+d)n(0,1) we have h(x)<=h(x')

Prove that if h is continuous on (0,1) then h(x)<=h(y) whenever x,y Э (0,1) and x<=y. Use a counterexample to show that this results may not be true when h is continuous

I thought I could do this by using definitions, but its not working for me.