Sooo to make a long story short, here's what im trying to accomplish.
I need to create a dropdown list of months, where the starting month is current month and the ending month is the previous months 2 years earlier.
Example of static version
Code: [Select]<option VALUE="">-Month-</option>
<option VALUE="0" >Oct-2009</option>
<option VALUE="1" >Sep-2009</option>
<option VALUE="2" >Aug-2009</option>
<option VALUE="3" >Jul-2009</option>
<option VALUE="4" >Jun-2009</option>
<option VALUE="5" >May-2009</option>
<option VALUE="6" >Apr-2009</option>
<option VALUE="7" >Mar-2009</option>
<option VALUE="8" >Feb-2009</option>
<option VALUE="9" >Jan-2009</option>
<option VALUE="10" >Dec-2008</option>
<option VALUE="11" >Nov-2008</option>
<option VALUE="12" >Oct-2008</option>
<option VALUE="13" >Sep-2008</option>
<option VALUE="14" >Aug-2008</option>
<option VALUE="15" >Jul-2008</option>
<option VALUE="16" >Jun-2008</option>
<option VALUE="17" >May-2008</option>
<option VALUE="18" >Apr-2008</option>
<option VALUE="19" >Mar-2008</option>
<option VALUE="20" >Feb-2008</option>
<option VALUE="21" >Jan-2008</option>
<option VALUE="22" >Dec-2007</option>
<option VALUE="23" >Nov-2007</option>
<option VALUE="24" >Oct-2007</option>
<option VALUE="25" >Sep-2007</option>
<option VALUE="26" >Aug-2007</option>
<option VALUE="27" >Jul-2007</option>
<option VALUE="28" >Jun-2007</option>
Now it's easy to figure out current month through getDate();
The loop is relatively easy also. But i dont know how to use the date to subtract if you will the months and years from the current date.
So all in all i need to create the code above dynamically.
Thanks Guys
need help modifying script
Hi guys,I'm fairly new to php and am having a bit of trouble modifying a script.This is the script:Code: <?php##############################################################################
Escaped characters
I have a script that allows you to post news to the home page of my site. Along with the news is the username of the person and a avatar type thing. When the script tries to send the avatar image to
defining website tags
Hi,What would be the best way to define tags for my site, such as website title, url etc.Should I just use somethng like:$website_name = "name";or should I use arrays?Thanks
SOAP Issue
Hi,I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.Thanks
Problem executing bash script using shell_exec
Hi there,I created a bash script file using following code to convert doc documents to pdf using OpenOffice macros.*************************doc2pdf:#!/bin/shecho "hi"DIR=$(pwd)
Facebook status update API
Hello,So, I'm trying to create my first Facebook application with PHP.Basic ideas for my application:My website includes feature called “tip of the week" and i would like to create a code
Extracting Long text from message class with parameters
Hi,
Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:Can a php script be written to make a judgement call on whether or not to display a flash animation or *jpeg based on a
PHP and XML image gallery variable issue
I'm trying to display the large image on the same page as the thumbnails, to do that I'm passing a variable called $current. I know that the code to display large image works, because it works when no
Uploading/Downloading files stored in MySQL database
Hey all,This problem just came up in my website and I'm having a hard time figuring out what's wrong. I have a intranet portal running (custom built) and I'm storing all different types of documents