A function which is continuous in one variable and measurable in other is jointly measurable Please help me to prove the following;

Let $ \ f:[0,1]^2\longrightarrow\mathbb{R}$ be such that:
(i) $\ f(x,\cdot)$ is measurable for each fixed $x\in[0,1]$;
(ii) $\ f(\cdot,y)$ is continuous for each fixed $y\in[0,1]$.
Show that $\ f$ is measurable.

 A: Suppose $f(x, y)$ is continuous in $x$ and measurable in $y$. Let $f_n: \mathbb{R}^2 \rightarrow \mathbb{R}$ be defined by $f_n(x, y) = f(m/n, y)$ where $m, n$ are integers $n \geq 1$ and such that $(m-1)/n \leq x < m/n$. Then $f_n$'s are all measurable. Now observe that, since $f$ is continuous in $x$, for fixed $(x, y)$, as $n \rightarrow \infty$, $f_n(x, y) \rightarrow f(x, y)$.
A: This sort of problem frequently boils down to approximating over simple functions of intervals.
In this 
problem, one approach is as follows: Let $\eta_n(t) = {\lfloor n t \rfloor \over n}$. Then for $k \in \mathbb{Z}$, we have $\eta_n(t) = {k \over n}$ iff $t \in [ k, k+ { 1 \over n})$. Then we can 'approximate' $f$ by $f(\eta_n(x),y)$ and use the facts that $\eta_n$ is constant over $[ k, k+ { 1 \over n})$ and $\lim_n \eta_n(t) = t$.
Let $\phi_n(x,t) = f(\eta_n(x),y) = \sum_{k \in \mathbb{Z}} 1_{[ k, k+ { 1 \over n})} (x) f({k \over n}, y)$. Since $(x,y) \mapsto 1_{[ k, k+ { 1 \over n})} (x)$ and $(x,y) \mapsto f({k \over n}, y)$ are measurable, we see that the $\phi_n$ are measurable.
Continuity gives $\phi_n(x,y) \to f(x,y)$, hence $f$ is measurable.
