Show that any cell complex is homotopy equivalent to a CW complex We will give the definitions of cell complex and CW complex we use at the end of the post. 
Briefly speaking, "in a cell complex you don't have to glue cells in the order of their dimension, whereas in a CW-complex you do." --Najib Idrissi.
Now I want to prove for any cell complex, there exists a CW complex that is homotopic to the cell complex.
A naive example is we can attach $0$-cell with $2$-cell to get a sphere, then attach the sphere with a loop, i.e. $$(e_0\cup e_2)\cup e_1$$
This is a cell complex. 
However, the corresponding CW complex should be 
$$(e_0\cup e_1)\cup e_2$$
For this example, the cell complex is even homeomorphic to the corresponding CW complex from the geometric intuition.  But it is hard to prove they are homotopy equivalent explicitly. For the general case, it is even harder. 
Any answer and hints are welcome!

A cell complex is a Hausdorff space $X$ together with a partition of $X$ into open cells (varying dimension) that satisfies two additional properties:


*

*For each $n$-dimensional open cell $C$ in the partition of $X$, there exists a continuous map $f$ from the $n$-dimensional closed ball to $X$ such that   


*

*the restriction of $f$ to the interior of the closed ball is a homeomorphism onto the cell $C$, and

*the image of the boundary of the closed ball is contained in the union of a finite number of elements of the partition.


*A subset of $X$ is closed if and only if it meets the closure of each cell in a closed set.

A CW complex is a topological space $X$, with a sequence of subspaces 
 $$X^0\subset X^1\subset X^2\subset \cdots \subset X,$$
 such that $X=\bigcup X^n$, with the following properties:


*

*$X^0$ is a discrete space.

*for each positive integer $n$, there is an index set $A_n$, and  continuous map $$\psi_i^n: S^{n-1} \to X^{n-1}$$ for each $i\in A_n$ and disjoint copies $D^n_i$ of $D^n$ (one for each $i\in A$) by identifying the points $x$ and $\psi_i^n(x)$ for each $x\in S_i^{n-1}$ and each $i\in A_n$.

*A subset $Y$ of $X$ is closed if  $Y\cap X^n$ is closed in $X^n,$ for each $n\geq 0$.

 A: The two definitions are equivalent. However, your definition of a CW complex is not complete: You require the existence of maps $\psi^n_i : S^{n-1} \to X^{n-1}$, but you do not mention that $X^n$ is obtained from $X^{n-1}$ by attaching for each $i$ a closed ball $D^n$ along the map $\psi^n_i$. To be formal, you have to require that there exists a quotient map
$$\Psi^n : X^{n-1} + D^n \times A_n \to X^n$$
where $A_n$ is given the discrete topology such that


*

*$\Psi^n(x) = x$ for $x \in X^{n-1}$.

*$\Psi^n(S^{n-1} \times A_n) \subset X^{n-1}$.

*$\Psi^n$ establishes a homeomorphism between $\mathring{D}^n \times A_n$ and $X^n \setminus X^{n-1}$.


The $\psi^n_i$ are given as $\psi^n_i(x) = \Psi^n(x,i)$.
Laxly speaking, $X^n$ is "the" quotient space obtained from the disjoint sum $X^{n-1} + D^n \times A_n$ by identifying $(x,i) \in S^{n-1} \times \{ i \}$ with $\psi^n_i(x) \in X^{n-1}$.
Note that neither the quotient maps  $\Psi^n$ nor the attaching maps $\psi^n_i$ are uniquely determined, and their particular choice is not part of the structure of a CW complex.
Each CW complex $X$ with quotient maps $\Psi^n$ is a cell complex, the open $n$-cells being the images $\Psi^n(\mathring{D}^n \times  \{ i \})$. These images do not depend on thr choice of $\Psi^n$.
Added: As Eric Wofsey pointed out in his comments this is not all trivial, but a proof is contained in Hatcher's "Algebraic Topology".
Conversely, each cell complex is a CW complex.
Added: Also this is contained in Hatcher.
First note that if $e$ is an open $n$-cell and $f : D^n \to X$ a "characteristic map" for $e$, then $e \subset f(D^n)$ and since the latter is compact, the closure $\overline{e} \subset f(D^n)$. Moreover, $f(D^n) = f(\overline{\mathring{D}^n}) \subset \overline{f(\mathring{D}^n)} = \overline{e}$. Therefore $\overline{e} = f(D^n)$ is compact and $\overline{e} \setminus e = f(S^{n-1})$ is contained in the union of finitely many open cells of dimension $< n$. We conclude that $\overline{e}$ intersects only finitely many open cells.
Now define $X^n =$ union of all open cells of dimension $\le n$. Then $X^0$ is the union of open $0$-cells which are simply points (since $D^0$ is a single point and $S^{-1} = \emptyset$). Each subset $M \subset X^0$ is closed in $X$ (hence also closed in $X^0$ so that $X^0$ is discrete): The intersection $M \cap \overline{e}$ is finite for any open $n$-cell $e$ because $\overline{e}$ intersects only finitely many $0$-cells, hence $M \cap \overline{e}$ is closed in $\overline{e}$.
Take characteristic maps $\Psi^n_i : D^n \to X$ for the open n-cells $e^n_i$ of $X$. We know that $\Psi^n_i(S^{n-1}) \subset X^{n-1}$, therefore we get a continuous surjection $\Psi^n : X^{n-1} + D^n \times A_n \to X^n$ with the above properties. It remains to show that it is a quotient map. So let $M \subset X^n$ be a subset that $(\Psi^n)^{-1}(M)$ is closed, i.e. $M \cap X^{n-1}$ is closed in $X^{n-1}$ and all  $M^n_i = (\Psi^n_i)^{-1}(M)$ are closed in $D^n$ (i.e. compact). We have to show that $M$ is closed in $X$, i.e. that $M \cap \overline{e}$ is closed in $\overline{e}$ for all open $k$-cells $e$. For $k < n$ this is obvious since $\overline{e} \subset X^{n-1}$. For $k = n$ we have $e = e^n_i$ and $M \cap \overline{e} = \Psi^n_i((\Psi^n_i)^{-1}(M)) = \Psi^n_i(M^n_i)$ which is compact. For $k > n$ we have $M \cap \overline{e} = M \cap (\overline{e} \setminus e)$. But 
$\overline{e} \setminus e$ is contained in the union of finitely open cells of dimension $< k$ so that $M \cap \overline{e}$ is contained in the union of finitely many open cells $e_1,\dots,e_r$ of dimension $\le n$. Thus $M \cap \overline{e} \subset M \cap \bigcup_{j=1}^r \overline{e}_r = \bigcup_{j=1}^r M \cap \overline{e}_r$, the latter being compact as we know from the previous steps. Hence $M \cap \overline{e} = (\bigcup_{j=1}^r M \cap \overline{e}_r) \cap \overline{e}$ is compact.
