Found it:

Let $I$ be a real interval. Let $a,b\in I$ such that $(a..b)$ is an open interval. Let $f:I\to \mathbb{R}$ be a real function which is continuous on $(a..b)$. Let $k\in \mathbb{R}$ lie between $f(a)$ and $f(b)$. That is, either $f(a)<k<f(b)$ or $f(b)<k<f(a)$. Then $\mathrm{\exists}c\in (a..b)$ such that $f(c)=k$.

Shouldn't this suppose continuity on the closed interval $[a,b]$? Otherwise consider $f:[-1,1]\to \mathbb{R}$ such that

$f(x)=\{\begin{array}{ll}\mathrm{arcsin}(x)& \text{-1<x<1}\\ 23& \text{if x=1}\\ -23& \text{if x= -1}\end{array}$

where $a=-1$ and $b=1$.

Let $I$ be a real interval. Let $a,b\in I$ such that $(a..b)$ is an open interval. Let $f:I\to \mathbb{R}$ be a real function which is continuous on $(a..b)$. Let $k\in \mathbb{R}$ lie between $f(a)$ and $f(b)$. That is, either $f(a)<k<f(b)$ or $f(b)<k<f(a)$. Then $\mathrm{\exists}c\in (a..b)$ such that $f(c)=k$.

Shouldn't this suppose continuity on the closed interval $[a,b]$? Otherwise consider $f:[-1,1]\to \mathbb{R}$ such that

$f(x)=\{\begin{array}{ll}\mathrm{arcsin}(x)& \text{-1<x<1}\\ 23& \text{if x=1}\\ -23& \text{if x= -1}\end{array}$

where $a=-1$ and $b=1$.