Ok, so I would like to know how to prove the following proof. If anyone has any insight I would greatly appreciate it.

Suppose $\displaystyle D$ is pathwise connected and $\displaystyle f\rightarrow R$ is continuous. Prove that $\displaystyle f(D)$ is an interval.

Is it enough to create a function that is continuous and then show that the function lives on an interval?

For example, $\displaystyle \phi (t)=(1-t)\alpha +t\beta $ where $\displaystyle \phi (0)=\alpha$and $\displaystyle \phi (1)=\beta $. Then show that the function lives on the interval [0,1]?