Take a function $f:\mathbb{R}^2\to \mathbb{R}$. For any straight line $\ell\subset\mathbb{R}^2$, consider the restriction $f_\ell:\mathbb{R}\to\mathbb{R}$ of $f$ to $\ell$. I believe the following is true:
$f$ is continuous $\Leftrightarrow$ $f_\ell$ is continuous for every $\ell$.
I have no idea how to prove it, however. Moreover, I believe it to be true if we consider just horizontal ($\mathbb{R}\times\{0\}$) and vertical lines ($\{0\}\times\mathbb{R}$). Does somebody have a proof or a counterexample?