Let $\phi:\mathbb R\to\mathbb R^2$ a surjective function - for instance a suitable (continuous) relative of a Peano curve. If we define $$\pi_x:\mathbb R^2\to \mathbb R\\(x,y)\mapsto x$$ then $\pi_x\circ\phi$ is what you want.
On Peano and Hilbert curves: Peano curve and Hilbert curve are examples of surjective and continuous maps $\gamma:[0,1]\to [0,1]\times [0,1]$. They are constructed through a step-by-step approximation which the animation on Wikipedia explains better than I could ever do.
An important fact to notice for the purpose of this problem is that, if we take for instance $\gamma$ to be the Hilbert curve, $\gamma(0)=(0,0)$ and $\gamma(1)=(0,1)$. Which means: the curve starts in a corner of the square, fills the entire $[0,1]\times[0,1]$ and it ends in another corner of the square. All of this as $0\le t\le 1$. So we can actually have a second Hilbert curve start at $(0,1)$ at $t=1$, fill up the entire square $[0,1]\times[1,2]$ and arrive in $(0,2)$ at $t=2$ and so on. At each step continuity is preserved. If we repeat this construction countably many times (perhaps, with some rotation or symmetry) we can cover the whole plane with the image of a continuous function whose domain is $\mathbb R$.
If we do not require continuity: Given any infinite set $X$, the existence of a bijective function $f:X\to X\times X$ is a set-theoretical fact which relies on the Axiom of Choice.
The point of my argument: Provided a surjective function $\phi:\mathbb R\to\mathbb R^2$, for each $y$ there are uncountably ($2^{\aleph_0}$, to be precise) many $z\in\mathbb R$ such that $\pi_x\circ \phi(z)=y$. Indeed, they are all the elements of $\phi^{-1}\left(\{x\}\times \mathbb R\right)$. But $\phi$ is surjective, hence $$\left\vert\phi^{-1}\left(\{x\}\times \mathbb R\right)\right\vert\ge\left\vert\{x\}\times\mathbb R\right\vert=|\mathbb R|$$