
938 So.2d 724 (2006)
BAYOU LIBERTY ASSOCIATION, INC., Sean Riley and K.T. Porter
v.
The ST. TAMMANY PARISH COUNCIL (Parish of St. Tammany).
No. 2005-CA-1228.
Court of Appeal of Louisiana, First Circuit.
June 9, 2006.
Rehearing Denied August 1, 2006.
*725 Edward A. Shamis, Jr., Slidell, for Appellants.
Walter P. Reed, District Attorney, Neil C. Hall, III, Assistant District Attorney, Office of the District Attorney, Covington, for Appellee.
*726 Panel composed of Ad Hoc Judges JAMES L. CANNELLA, SUSAN S. CHEHARDY and FREDERICK HOMBERG WICKER.
JAMES L. CANNELLA, Judge Ad Hoc.
In a zoning case, the Plaintiffs, Bayou Liberty Association, Inc., Sean Riley, and K.T. Porter, appeal from a judgment granting a peremptory exception of no cause of action filed by the Defendant, The St. Tammany Parish Council. We reverse and remand.
On April 29, 2004, the Plaintiffs filed a petition for declaratory judgment in the district court to have a decision by the Defendant, approving the rezoning of a 60 acre parcel of land in Slidell, Louisiana from a suburban (A-2) district to a Planned Unit Development (PUD) district, declared void. In response, the Defendant filed various exceptions, including the peremptory exception of no cause of action. The exception of no cause of action was granted on January 3, 2005.
The petition asserts the following facts. The Plaintiffs reside along or near Bayou Liberty in Slidell, Louisiana. Paris Properties, L.L.C. (Paris Properties) is the owner of 60 acres near or adjacent to the Plaintiffs. On April 23, 2001, Kelly J. McHugh & Associates, on behalf of Paris Properties, applied to St. Tammany Parish to change the zoning of the 60 acres from A-2 (suburban) District to Planned Unit Development (PUD) District. The purpose of the application was to develop a residential subdivision tentatively named Logan's Tract with 120 lots, averaging in size from 75-80 × 125 feet. The original A-2 zoning requires lots to be no less than one acre in size. A conceptual plan was submitted showing that the eastern two-thirds of the site are located in Flood Zone A, the 100-year flood zone. The plan further shows that most of the site is wetlands, and that many of the proposed residential lots would be located in Flood Zone A. The plan was attached to the petition.
The Parish Zoning Board approved the rezoning in July of 2001, despite challenges by the Plaintiffs that the conceptual plan shows that the rezoning to a PUD would violate the St. Tammany Parish Land Use Ordinance, No. 523, section 2.09, and in particular section 2.0902. The Plaintiffs asserted that section 2.0902 states that the PUD site "shall use flood hazard areas if present for recreational areas . . .," and that the site "shall be suitable for development in the manner proposed without hazard to persons or property adjacent to the site . . ." Flood hazard areas are defined as land in Flood Zone A in the Code of Ordinances of St. Tammany Parish, Flood Hazard Area Ordinance, section 7-019.01. Further, the Plaintiffs alleged that the site is also not suitable because the surrounding neighborhood is subject to flooding which will be worsened by the proposed development.
The Plaintiffs appealed the zoning decision to the Defendant, which reviews the acts of the Zoning Commission and is the final decision-making authority for zoning matters. In August of 2001, the Defendant voted to overturn the Zoning Commission's decision. However, it nevertheless allowed the decision to stand because the vote was 8-3, less than the 9 votes required to overturn the decision. As a result the Plaintiffs filed suit in the District Court contesting the PUD rezoning.
In June of 2002, the trial judge declared that Ordinance No. 2275, changing the zoning from A-2 to PUD was null and void. In the judgment, the trial judge stated that if the proposed PUD zoning change was brought again, it had to be proposed in the form of an Ordinance to be voted upon by the Defendant, subject to *727 the existing protest (by the Plaintiffs.) The trial judge cited the St. Tammany Parish Code, section 8.0106 for his decision.
The zoning change request was subsequently placed back on the agenda of the Defendant at the request of the developers, in the form of Ordinance Number 2794. The conceptual plan shows that approximately 50% of the proposed residential lots are in Flood Zone A. Nevertheless, on April 1, 2004, the Defendant voted to approve the zoning change over the protests of the Plaintiffs that the rezoning would violate the PUD ordinance, including but not limited to section 2.0902 A.
A hearing on the exceptions filed by the Defendant was held on November 29, 2004. The trial judge ruled from the bench in favor of the Defendant on the exception of no cause of action. He issued written reasons on December 6, 2004, and a written judgment on January 3, 2005. In the judgment, the trial judge denied the exception of no right of action, found the exception of nonjoinder of a party moot, and granted the exception of no cause of action. In his reasons for judgment, the trial judge determined that the PUD ordinance is "non-mandatory." He stated that "The Ordinance clearly sets forth that its provision are `general standards and criteria [that] shall be applicable.' Section 2.0902." The trial judge further stated, "The Court cannot conceive that the ordinance should be read to be mandatory after such a preliminary statement." The judge further cited Section 2.0903 B and B(2), which states that the Zoning Commission "shall determine if the applicant has met all or part of the PUD parameters including . . . 2. That the desirable modifications of general zoning or PUD regulations as applied to the particular case, justify such modifications or regulations . . ." The trial judge concluded that this language supports his finding that the PUD regulations are "mere general standards and criteria." He cited Allen v. St. Tammany Parish Police Jury, 96-0938 (La.App. 1st Cir.2/14/97), 690 So.2d 150, although he correctly noted that the case was not directly on point as it dealt with a mandamus.
On appeal, the Plaintiffs contend that the trial judge erred in granting the exception of no cause of action. The Plaintiffs assert that Section 2.09 of PUD Ordinance is mandatory. The Plaintiffs alternatively assert that the trial judge erred in refusing to allow the Plaintiffs an opportunity to amend the petition.
DECLARATORY JUDGMENT
La.C.C.P. art. 1871 states:
Courts of record within their respective jurisdictions may declare rights, status, and other legal relations whether or not further relief is or could be claimed. No action or proceeding shall be open to objection on the ground that a declaratory judgment or decree is prayed for; and the existence of another adequate remedy does not preclude a judgment for declaratory relief in cases where it is appropriate. The declaration shall have the force and effect of a final judgment or decree.
La.C.C.P. art. 1881 further provides that articles 1871 through 1883 are remedial and their purpose is to settle and afford relief from uncertainty and insecurity with respect to rights, status, and other legal relations, and they are to be liberally construed and administered. The difference between the declaratory judgment and a conventional judgment is that, in a conventional judgment there is an ascertainment or declaration of the rights of the parties (usually implied) and a specific award of relief. The declaratory judgment embodies only the first element which is always express. Davis v. Town of *728 St. Gabriel, 01-0031 (La.App. 1st Cir.2/15/02), 809 So.2d 537, 542; Official Revision Comments to La.C.C.P. art. 1871. A suit for declaratory judgment is an appropriate procedural vehicle to test the validity of an ordinance. Villa Del Rey Citizens Association v. City of Baton Rouge, 233 So.2d 566, 568 (La.App. 1st Cir.1970); Saltamachia v. Parish of Jefferson, 579 So.2d 1197, 1199 (La.App. 5th Cir.1991).
NO CAUSE OF ACTION
A cause of action, for purposes of the peremptory exception, is defined as the operative facts that give rise to the plaintiff's right to judicially assert the action against the defendant. Ramey v. DeCaire, 03-1299 (La.3/19/04), 869 So.2d 114, 118; Everything on Wheels Subaru, Inc. v. Subaru South, Inc., 616 So.2d 1234, 1238 (La.1993). The function of the exception of no cause of action is to test the legal sufficiency of the petition by determining whether the law affords a remedy on the facts alleged in the petition. Ramey, 869 So.2d at 118; Everything on Wheels Subaru, Inc., 616 So.2d at 1235; Rebardi v. Crewboats, Inc., 04-0641 (La.App. 1st Cir.2/11/05), 906 So.2d 455, 457.
Generally, no evidence may be introduced to support or controvert the exception raising the objection of no cause of action. La. C.C.P. art. 931; Ramey, 869 So.2d at 118; Rebardi, 906 So.2d at 457. In addition, all facts pled in the petition must be accepted as true, and any doubts are resolved in favor of the sufficiency of the petition to state a cause of action. Ramey, 869 So.2d at 118; Rebardi, 906 So.2d at 457. Thus, the only issue at the trial of the exception is whether, on the face of the petition, the plaintiff is legally entitled to the relief sought. Ramey, 869 So.2d at 118; Rebardi, 906 So.2d at 457. If the petition alleges sufficient facts to establish a case cognizable in law, the exception raising the objection of no cause of action must fail. Rebardi, 906 So.2d at 457. Furthermore, when a petition states a cause of action as to any ground or portion of a demand, the exception should be overruled. Ramey, 869 So.2d at 119; Livingston Parish Sewer Dist. No. 2 v. Millers Mut. Fire Ins. Co. of Texas, 99-1728 (La.App. 1st Cir.9/22/00), 767 So.2d 949, 952.
Appellate courts review a judgment sustaining a peremptory exception raising the objection of no cause of action de novo. Ramey, 869 So.2d at 119; Rebardi, 906 So.2d at 457. This is because the exception raises a question of law, and the trial court's decision is based only on the sufficiency of the petition. Ramey, 869 So.2d at 119; Rebardi, 906 So.2d at 457.
In reviewing the petition to determine whether a cause of action has been stated, the court must, if possible, interpret it to maintain the cause of action. Livingston Parish Sewer Dist. No. 2, 767 So.2d at 952. Any reasonable doubt concerning the sufficiency of the petition must be resolved in favor of finding that a cause of action has been stated. Id.; Ramey, 869 So.2d at 119.
If the court finds that the exception of no cause of action should be granted, but the grounds of the objection may be removed by amendment of the petition, the judgment sustaining the exception shall order such amendment within the delay allowed by the court. La.C.C.P. art. 934. If the grounds of the objection cannot be removed, or if the plaintiff fails to comply with the order to amend, the action, claim, demand, issue, or theory shall be dismissed. Id.
In this case, the parties refer to the provisions of the St. Tammany Parish ordinances. The ordinances were not attached *729 to the petition, and therefore, are not part of the petition. However, judicial notice can be taken of ordinances, pursuant to La.C.E. art. 202. In accordance with the article, the Defendant asked for the court to take judicial notice of the ordinances and filed a copy into the record.[1] See also: Plaisance v. Davis, 03-0767 (La.App. 1st Cir.11/7/03), 868 So.2d 711, 717. Thus, the ordinances are properly reviewable in determining the exception of no cause of action.
We have reviewed the petition and the ordinances and conclude that the petition does state a cause of action. Even if the provisions of the PUD ordinance are non-mandatory, an issue which we are not determining here, and permit the Defendant discretion to decide rezoning matters, it cannot abuse its discretion. The petition sets out allegations that the Defendant did abuse its discretion in rezoning the property, not only because it violates the PUD ordinance, but because of its affect on the neighboring properties. Thus, we find that the exception of no cause of action should have been denied.
JUSTICIABLE CONTROVERSY & DECLARATORY JUDGMENT
The Defendant argues alternatively that the no cause of action is supported by the lack of justiciable controversy. The Defendant asserts that the Plaintiffs' complaints are premature since the plan is conceptual only, and is only the first of three plans that have to be approved before anything can be done on the property pursuant to the PUD requirements.
Trial courts are vested with wide discretion in deciding whether to grant or refuse declaratory relief. Louisiana *730 Supreme Court Committee on Bar Admissions ex rel. Webb v. Roberts, 00-2517 (La.2/21/01), 779 So.2d 726, 728. For a declaratory judgment to be granted there must be a justiciable controversy, as courts are not permitted to issue advisory opinions based on a contingency which may or may not occur. Id. Courts should not decide abstract, hypothetical or moot controversies, or render advisory opinions with respect to such controversies. Webb, 779 So.2d at 728; St. Charles Parish School Board v. GAF Corp., 512 So.2d 1165, 1170 (La.1987), (on rehearing) (citations omitted).
In this case, we find that there is a justifiable controversy based on the petition, the conceptual plan, and the PUD ordinances. Thus, the action for declaratory judgment is ripe for decision.
Accordingly, the judgment granting the exception of no cause of action is hereby reversed. The case is remanded for further proceedings.
REVERSED AND REMANDED.
NOTES
[1]  La.C.E. art. 202 provides:

A. Mandatory. A court, whether requested to do so or not, shall take judicial notice of the laws of the United States, of every state, territory, and other jurisdiction of the United States, and of the ordinances enacted by any political subdivision within the court's territorial jurisdiction whenever certified copies of the ordinances have been filed with the clerk of that court.
B. Other legal matters. (1) A court shall take judicial notice of the following if a party requests it and provides the court with the information needed by it to comply with the request, and may take judicial notice without request of a party of:
(a) Proclamations of the President of the United States and the governor of this state.
(b) Rules of boards, commissions, and agencies of this state that have been duly published and promulgated in the Louisiana Register.
(c) Ordinances enacted by any political subdivision of the State of Louisiana.
(d) Rules which govern the practice and procedure in a court of the United States or of any state, territory, or other jurisdiction of the United States, and which have been published in a form which makes them readily accessible.
(e) Rules and decisions of boards, commissions, and agencies of the United States or of any state, territory, or other jurisdiction of the United States which have been duly published and promulgated and which have the effect of law within their respective jurisdictions.
(f) Law of foreign countries, international law, and maritime law.
(2) A party who requests that judicial notice be taken and the court, if notice is taken without request shall give reasonable notice during trial to all other parties.
C. Information by court. The court may inform itself of any of the foregoing legal matters in such manner as it may deem proper, and the court may call upon counsel to aid it in obtaining such information.
D. Time of taking notice. Judicial notice of the foregoing legal matters may be taken at any stage of the proceeding, provided that before taking judicial notice of a matter in its instructions to the jury, the court shall inform the parties before closing arguments begin.
E. Question for court. The determination of the foregoing legal matters shall be made by the court.
