This article concerns the existence and multiplicity of solutions to a class of p(x)-Laplacian-like equations. We introduce a revised Ambrosetti-Rabinowitz condition, and show that the problem has a nontrivial solution and infinitely many solutions, respectively.