Opinion by
Mr. Justice Cohen,Appellant, Key Realty Company, purchased a tract of land comprising two lots in the Borough of Media. A three-story single family residence was situate upon one of the lots. Subsequently, the building was converted into a three unit apartment house, a permitted use under the zoning classification then applicable.
... At a later date, appellant attempted to obtain a permit to erect an apartment house on the second lot. The application was denied, however, because the side yard requirements of the borough zoning ordinance would not be met by the proposed structure. The zoning ordinance was amended subsequently, upgrading the area to permit the erection only of single-family detached dwellings.
Eight months after the passage of the rezoning ordinance, appellant requested a permit to erect an apartment house on the second lot. Since apartment houses were now prohibited under the applicable zoning regulations, the permit was refused. This action was sustained by the zoning board and the lower court. .
Appellant maintains that the amendatory zoning ordinance is not enforceable in respect to its property and that the requested use of the lot as an apartment house is merely a lawful extension of the prior existing nonconforming use.
Even though the borough council had notice that appellant was planning to erect a second apartment house upon its land, the council did not act improperly, in passing the prohibitory ordinance. Appellant acquired no vested right in the continuation of the zon-. ing classification which permitted the erection of an apartment building. Schmidt v. Philadelphia Zoning Board of Adjustment, 382 Pa. 521, 114 A. 2d 902 (1955). Nor is the proposed erection of a second apartment house a natural extension of the nonconforming, use to which the land was devoted. Rather, it is an at-. *100tempt to subject the property in question to an entirely new nonconforming use.
Appellant raises, however, the much more serious question of the validity of the amendatory ordinance, arguing that the borough council did not adopt it “in accordance with a comprehensive plan” nor with “reasonable consideration ... to the character of the district” as required by the enabling provision of The Borough Code, July 10, 1947, P. L. 1621, §93 (§3303), as amended, 53 P.S. §48303.
Courts have taken innumerable approaches in testing whether a zoning ordinance complies with the requirement contained in the enabling act that it be “in accordance with a comprehensive plan.” See Haar, “In Accordance With a Comprehensive Plan”, 68 Harv. L. Rev. 1154 (1955); Haar & Hering, The Lower Gwynedd Township Case: Too Flexible Zoning Or An Inflexible Judiciary?, 74 Harv. L. Rev. 1552 (1961); Haar, Regionalism and Realism in Land-TJse Planning, 105 IT. Pa. L. Rev. 515 (1957), and Note, 71 Yale L. J. 720 (1962).
In Eves v. Zoning Board of Adjustment, 401 Pa. 211, 164 A. 2d 7 (1960), we stated that “ ‘Zoning is the legislative division of a community into areas in each of which only certain designated uses of land are permitted so that a community may develop in an orderly manner in accordance with a comprehensive plan.’ ” In Eves, the local ordinance permitted the township board of supervisors to rezone individual pieces of property so as to permit the use of the land in a manner not conforming with the applicable zoning classification. In reality, this plan of “flexible” or “floating” zoning was nothing more than quasi-spot-zoning by the township. Hence, we invalidated the ordinance.
Selection of individual properties or groups of properties for rezoning, even if authorized by an ordinance, is not in compliance with the statutory mandate that *101zoning regulations must be “in accordance with a comprehensive plan.” To fulfill this requirement, zoning legislation must reflect and implement the totality of a municipality’s program of land utilization, considering both the land resources available and the needs and desires of the community. This does not contemplate a rigid “master-plan” which attempts to answer in minute detail every last question regarding land utilization ; whether that plan be formulated by a planning commission or by the zoning ordinance itself. Nor, on the other hand, should it be, as in Eves, loose legislation permissive of ad hoc determinations of the land utilization of comparatively small sections of the community.
Rather, to conform to the requirements of the enabling legislation (53 PS §48303), a zoning ordinance must take into account all the relevant data, studies and information which contribute towards an understanding of the community’s needs, and must constitute a reasonable solution of the municipality’s problems of land use.
Accordingly, we do not attempt herein to evaluate whether a single property or a small group of properties would or would not fit into the overall program. Nor do we merely decide the reasonableness of a particular piece of zoning legislation and exclude from our consideration its significance within the total pattern of land use. Indeed, it is the whole program of land utilization that determines what should be done with the individual parcels.
In Eves, zoning regulation assumed the form of ad hoc rezoning of individual parcels; hence, we determined that it was not in accordance with a comprehensive plan. Here, on the other hand, the impact of the amendatory zoning ordinance prohibiting the erection of apartments falls equally upon all the properties within a wide area of the community.
*102Moré' important, the ordinance constituted an integral part of a general land prograin for. the municipality wherein the continued existence of this section as an area predominately of single or double homes, along with the already existing apartments, was contemplated. The amendatory act effected the rezoning of a substantial area of the borough within the framework of an overall evaluation by the council of the ';bésí practical use of the land considering the total needs of the municipality. We cannot.say that the zoning legislation in question violated the legislative re'qhlfement that it be “in accordance with a comprehensive plan” merely because it was an appendage to the general zoning ordinance and has the purpose and effect of güaranteeing that the area in question will, continúe predominately as a neighborhood of single and twin houses. ■
We do not determine here that the ordinance is wise — we only décide that the change of zoning was accomplished in compliance with the requirement in the enabling legislation of The Borough Code (53 PS §48303). Appellant has not been prevented from using thé propérty in question for an apartment house because of the harm that might be done to the owners or occupants-of other lots within the district. Rather, he was prevented from so using his property because' the Zoning ordinance prohibiting- this use and designating :'thé aréa for single and double family homes was a reasonable allocation of that section of the community within the total framework of the borough’s program of land utilization, and, hence, in accordance with a coiáprehensivé plan.
Order affirmed.