
101 Ariz. 375 (1966)
419 P.2d 732
R.R. DAVIDSON, as Zoning Inspector for the County of Maricopa, Arizona, a Body Politic, Appellant,
v.
ALL STATE MATERIALS CO., Inc., and J.M. Krumtum dba Construction Equipment Rentals and Materials of Phoenix, also known as Pacific Sand and Gravel Co., Appellees.
No. 8159.
Supreme Court of Arizona. In Division.
November 3, 1966.
Laurence H. Whitlow, Phoenix, for appellant.
Otto H. Linsenmeyer, Richard J. Herbert, Phoenix, for appellees.
STRUCKMEYER, Chief Justice.
This action was commenced by R.R. Davidson as the Chief Zoning Inspector for Maricopa County, Arizona, against All *376 State Materials Co., Inc., and another. Its purpose was to obtain an injunction to prevent All State from operating an asphalt manufacturing plant in an area zoned and classified by county ordinance as "Rural". From an order dismissing Davidson's complaint, this appeal has been perfected.
A brief statement of the relevant facts makes it plain why this cause must be reversed.
Defendant All State did not answer Davidson's complaint on the merits but filed a motion to dismiss the complaint on the grounds that the zoning ordinance which was purportedly violated was a nullity for failure to comply with the enabling legislation, A.R.S. §§ 11-801 through 11-830. Manifestly, defendant's motion was not within the stated grounds for a motion to dismiss. Rule 12(b), Rules of Civil Procedure, 16 A.R.S.
However, at the argument on the motion to dismiss, some statements were made by counsel which, had they been established by evidence in the case, might have some relevancy in the ultimate disposition of the action. We have said before that a "court should not grant a motion to dismiss unless it appears certain that the plaintiff would be entitled to no relief under any state of facts which is susceptible of proof under the claim as stated." Long v. Arizona Portland Cement Co., 89 Ariz. 366, 362 P.2d 741. While a motion to dismiss may, under certain circumstances, be treated as a motion for a summary judgment, all parties must be given a reasonable opportunity to present facts pertinent to a determination under Rule 56, Rules of Civil Procedure, supra. See Rule 12(b), Rules of Civil Procedure, supra.
There was before the trial court no fact, either by deposition, affidavit or by stipulation from which the court below could determine that the county ordinance in its adoption did not comply with the conditions required by the Arizona Legislature. Neither was the county ordinance before the court nor the purported comprehensive plan upon which, by statute, the ordinance must be based.
The judgment is reversed with directions to reinstate the complaint.
BERNSTEIN, V.C.J., and McFARLAND, J., concur.
