Hello,
Thanks in advance for any help provided.
There are a couple of things I need worked out.
First off. This might be simple, but i can't figure it out. I have a script that determines the current month and the last month, to be used to access a database. The script is below:
//Initialize month
$amonth = array("january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");
$month = gmdate ("m");
$cmonth = $month-01;
$lmonth = $month-02;
$curmonth = $amonth[$cmonth].01;
$prevmonth = $amonth[$lmonth].01;
as you can see its very crude. it works, but there is a problem. In January, this snippit won't tell me that the last month was December. What i need is a way to figure out the last month in textual format and place into a variable for use.
The second thing, is quite related. As you can see from the snippit above, i take the name of the month, i.e. october, and add it to _01 to get october_01, for example.
This is used as the name of a table. What I need to be able to do is to take that string, and break it up. For example october_01, gets broken up into october -and- _01. This way i can use this for a search drop down list.
Thanks again for any help provided.
Mike