We study the boundary value problem $-{\mathrm div}((|\nabla u|^{p_1(x) -2}+|\nabla u|^{p_2(x)-2})\nabla u)=f(x,u)$ in $\Omega $, $u=0$ on $\partial \Omega $, where $\Omega $ is a smooth bounded domain in ${\mathbb{R}} ^N$. Our attention is focused on two cases when $f(x,u)=\pm (-\lambda |u|^{m(x)-2}u+|u|^{q(x)-2}u)$, where $m(x)=\max \lbrace p_1(x),p_2(x)\rbrace $ for any $x\in \overline{\Omega }$ or $m(x)<q(x)< \frac{N\cdot m(x)}{(N-m(x))}$ for any $x\in \overline{\Omega }$. In the former case we show the existence of infinitely many weak solutions for any $\lambda >0$. In the latter we prove that if $\lambda $ is large enough then there exists a nontrivial weak solution. Our approach relies on the variable exponent theory of generalized Lebesgue-Sobolev spaces, combined with a ${\mathbb{Z}} _2$-symmetric version for even functionals of the Mountain Pass Theorem and some adequate variational methods.