I spent a few hours on this problem before realizing there is an error in it. I am sharing my solution to save others' time. I denote such a continuous mapping as $f$.
We can prove the only if part by contradiction. If the statement is not true, there exist an $\epsilon > 0$ and $x_n, y_n \in E$, such that $|x_n - y_n| < \frac{1}{2^n}$ and there isn't any $\gamma$ joining $x_n$ to $y_n$ such that $\gamma \subset B_\epsilon (x_n)$ and $\gamma \subset B_\epsilon (y_n)$.
Because $E$ is compact, we can find a subsequence $(x_i, y_i)$ such that $\lim_{i\rightarrow\infty} x_i = \lim_{i\rightarrow\infty} y_i = x \in E$.
Because $[0,1]$ is compact, we can find
- a subsequence $a_j$ in the unit interval such that $f(a_j) = x_{i_j}$ and $\lim_{j\rightarrow\infty} a_j = a \in [0,1]$, and
- a subsequence $b_j$ in the unit interval such that $f(b_j) = y_{i_j}$ and $\lim_{j\rightarrow\infty} b_j = b \in [0,1]$.
Note that $a$ and $b$ might be different. Still, we can now define $\gamma_N = f([a_N, a]) \cup f([b, b_N])$. This curve will be within any $B_\epsilon(x)$ for sufficiently large $N$. By construction, it joins $f([a_N)$ and $f([b_N)$, leading to a contradiction.
The if part is simply not true. A trivial counter-example is $E = \{ 0, 1\}$. $E$ is locally connected, but not (globally) connected. We cannot find a continuous mapping from $[0,1]$ to $E$. If we change locally connected to connected in the original problem, we can find mapping $f$ by
- Find a continuous mapping $f'$ from the Cantor set $\mathcal{C}$ to $E$ (as in Problem 5).
- $\mathcal{C}^C$ is made of a countable set of open intervals $(a_i, b_i)$. Since $f'(a_i)$ and $f'(b_i)$ are connected by a curve $\gamma_i \subset E$, we simply reparameterize $\gamma_i$ so that it maps $[a_i, b_i]$ to the same curve in $E$. In this way we extend $f'$ defined on $\mathcal{C}$ to $f$ defined on $[0,1]$.
Combining both halves of the problem, we have proved that A compact and connected subset $K$ of $\mathbb{R}^d$ is uniformly locally connected.