OctoberWind
02-04-2010, 02:10 PM
First, Java isn't my native language (PHP is, which makes this extra tricky).
<%
String calMonth = dateUtils.getTextMonth(new java.util.Date());
String calNum = dateUtils.getNumberMonth(new java.util.Date());
String calLinkList[];
calLinkList = new String[13];
calLinkList[1] = "http://www.belyea.com";
calLinkList[2] = "http://www.rpmachine.com";
// ... etc.
String calLink = calLinkList[02];
%>
<p>Month: <%=calMonth+calNum %></p>
<p>Link: <%=calLink %></p>
First off, the dateUtils stuff at the top is defined in another location, and pulls Jan, Fab, Mar... Dec and 01, 02,03...12 respectively. I know those work, and get the expected values.
I'm stuck here:
String calLink = calLinkList[02];
I need the "02" to be the calNum variable. i just can't seem to get the variable to plug into the array call. If i use static numbers it works, i just need the static number to be dynamic based on the number from calNum
Month: and Link: at the bottom are my test displays. End result is plugging into an URL.
<%
String calMonth = dateUtils.getTextMonth(new java.util.Date());
String calNum = dateUtils.getNumberMonth(new java.util.Date());
String calLinkList[];
calLinkList = new String[13];
calLinkList[1] = "http://www.belyea.com";
calLinkList[2] = "http://www.rpmachine.com";
// ... etc.
String calLink = calLinkList[02];
%>
<p>Month: <%=calMonth+calNum %></p>
<p>Link: <%=calLink %></p>
First off, the dateUtils stuff at the top is defined in another location, and pulls Jan, Fab, Mar... Dec and 01, 02,03...12 respectively. I know those work, and get the expected values.
I'm stuck here:
String calLink = calLinkList[02];
I need the "02" to be the calNum variable. i just can't seem to get the variable to plug into the array call. If i use static numbers it works, i just need the static number to be dynamic based on the number from calNum
Month: and Link: at the bottom are my test displays. End result is plugging into an URL.