I have the following code, can you please help me to figure out how I could access the f_seat_status variable outside the if loop? Thank you.
<%
int l_session_seats_available =3;
if (l_session_seats_available > 0) {
String f_seat_status = "enrolled";
} else if (l_session_seats_available <= 0) {
String f_seat_status = "waiting list";
}
%>
<%=f_seat_status %> <--- How do I get the f_seat_status outside the IF loop??
<%
int l_session_seats_available =3;
if (l_session_seats_available > 0) {
String f_seat_status = "enrolled";
} else if (l_session_seats_available <= 0) {
String f_seat_status = "waiting list";
}
%>
<%=f_seat_status %> <--- How do I get the f_seat_status outside the IF loop??