Re: [PHP] Month with leading zeros

2008-05-11 Thread Jim Lucas
Jim Lucas wrote: Ron Piggott wrote: I am wanting to change echo " 'January', '2' => 'February', '3' => 'March', '4' => 'April', '5' => 'May', '6' => 'June', '7' => 'July', '8' => 'August', '9' => 'September', '10' => 'October', '11' => 'November', '12' => 'December'); $current_month =

Re: [PHP] Month with leading zeros

2008-05-11 Thread Jim Lucas
Ron Piggott wrote: I am wanting to change echo " 'January', '2' => 'February', '3' => 'March', '4' => 'April', '5' => 'May', '6' => 'June', '7' => 'July', '8' => 'August', '9' => 'September', '10' => 'October', '11' => 'November', '12' => 'December'); $current_month = DATE("n"); echo

Re: [PHP] Month with leading zeros

2008-05-10 Thread Casey
On 5/10/08, Ron Piggott <[EMAIL PROTECTED]> wrote: > I am wanting to change > > echo " > to output the month number, between 01 and 12 --- DATE value m, the > month with leading 0's. How do I do this? $months is an array, as I > have shown below. Ron > >$months = array('1' => 'Ja

Re: [PHP] Month with leading zeros

2008-05-10 Thread David Otton
> for ($i = 1; $i >= 12; $i++) I'm an idiot. for ($i = 1; $i <= 12; $i++) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Month with leading zeros

2008-05-10 Thread David Otton
2008/5/10 Ron Piggott <[EMAIL PROTECTED]>: > I am wanting to change > > echo " > to output the month number, between 01 and 12 --- DATE value m, the > month with leading 0's. How do I do this? $months is an array, as I > have shown below. Ron > > $months = array('1' => 'January', '2' =>

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
PROTECTED]> wrote: >> >> > -Original Message- >> > From: Dan Shirah [mailto:[EMAIL PROTECTED] >> > Sent: Monday, February 19, 2007 2:08 PM >> > To: Brad Fuller >> > Cc: Jay Blanchard; php-general >> >

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
gt; On 2/19/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 2:08 PM > To: Brad Fuller > Cc: Jay Blanchard; php-general > Subject: Re: [PHP] Month > > Okay, when I tr

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
ssage- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 2:08 PM > To: Brad Fuller > Cc: Jay Blanchard; php-general > Subject: Re: [PHP] Month > > Okay, when I try the sprintf I get the following error when I try to save > my > form > > I

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
er <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:44 PM > To: Jay Blanchard > Cc: php-general > Subject: Re: [PHP] Month > > Okay, so sprintf("%02s", $m) means that the value

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
itional {"} echo "$months"; -B } ?> On 2/19/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:44 PM > To: Jay Blanchard > Cc: php-general > S

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 2:08 PM > To: Brad Fuller > Cc: Jay Blanchard; php-general > Subject: Re: [PHP] Month > > Okay, when I try the sprintf I get the following error when I

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
D] > Sent: Monday, February 19, 2007 1:44 PM > To: Jay Blanchard > Cc: php-general > Subject: Re: [PHP] Month > > Okay, so sprintf("%02s", $m) means that the value of $m would be checked > for > the amount of digits returned. If less than two digits a zero would be &g

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:44 PM > To: Jay Blanchard > Cc: php-general > Subject: Re: [PHP] Month > > Okay, so sprintf("%02s", $m) means that the value of $m would be checked >

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
Okay, so sprintf("%02s", $m) means that the value of $m would be checked for the amount of digits returned. If less than two digits a zero would be added to the front, correct? On 2/19/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] If I change my date value to m instead of M, that would o

RE: [PHP] Month

2007-02-19 Thread Jay Blanchard
[snip] If I change my date value to m instead of M, that would only affect the visual month representation that they see, and not the "selected" value that I want to input into my database thoughright? [/snip] Do a combination. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Month

2007-02-19 Thread Brad Fuller
> -Original Message- > From: Dan Shirah [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 1:27 PM > To: php-general > Subject: [PHP] Month > > Greetings, > > I have the following code which populates a dropdown box so a user can > select a month. They see the month name and the

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
If I change my date value to m instead of M, that would only affect the visual month representation that they see, and not the "selected" value that I want to input into my database thoughright? On 2/19/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] I have the following code which popu

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
Dan Shirah wrote: Greetings, I have the following code which populates a dropdown box so a user can select a month. They see the month name and the SELECTED value is the corresponding numeric value 1-12 for the month. However, the selected value for January would be 1. I need the selected v

RE: [PHP] Month

2007-02-19 Thread Jay Blanchard
[snip] I have the following code which populates a dropdown box so a user can select a month. They see the month name and the SELECTED value is the corresponding numeric value 1-12 for the month. However, the selected value for January would be 1. I need the selected value fro January to be 01

Re: [PHP] Month display calendar

2007-01-19 Thread Nick Stinemates
On Sat, Jan 20, 2007 at 12:37:08AM +0800, Denis L. Menezes wrote: > Dear friends. > > Can anyone please show me calendar scripts to make a calendar with a monthly > display as shown in http://www.easyphpcalendar.com/ ? > > Thanks > Denis > > -- > PHP General Mailing List (http://www.php.net/

RE: [PHP] Month display calendar

2007-01-19 Thread Jay Blanchard
[snip] Can anyone please show me calendar scripts to make a calendar with a monthly display as shown in http://www.easyphpcalendar.com/ ? [/snip] Have you STFW or RTFM? There is a truckload of PHP code on the web that you can review, dissect, and learn from. -- PHP General Mailing List (http:

Re: [PHP] Month in a numeric form

2006-10-15 Thread J R
http://www.php.net/manual/en/function.strtotime.php http://www.php.net/manual/en/function.date.php On 10/16/06, Ron Piggott (PHP) <[EMAIL PROTECTED]> wrote: Is there a way I am able to use the DATE command to convert January to 1, February to 2, etc. -- GMail Rocks!!!

Re: [PHP] Month in a numeric form

2006-10-15 Thread Travis Doherty
Ron Piggott (PHP) wrote: >Is there a way I am able to use the DATE command to convert January to >1, February to 2, etc. > > > What is wrong with date()? www.php.net/date $month = 'Jan'; $numericMonth = date('m', strtotime("$month 01 2000"); Travis Doherty -- PHP General Mailing List (http:/

Re: [PHP] Month name

2003-06-25 Thread cavagnaro
Thanks guys! It works perfectly!! "Boaz Yahav" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] Check out : http://www.php.net/manual/en/function.date.php M - A short textual representation of a month, three letters Jan through Dec Sincerely berber Visit http://www.weberdev.co

RE: [PHP] Month name

2003-06-24 Thread Martin Towell
date("F", mktime(0, 0, 0, $mm, $dd, $)); http://au2.php.net/manual/en/function.date.php http://au2.php.net/manual/en/function.mktime.php -Original Message- From: cavagnaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, 25 June 2003 4:31 PM To: [EMAIL PROTECTED] Subject: [PHP] Month name

RE: [PHP] Month name

2003-06-24 Thread Boaz Yahav
Check out : http://www.php.net/manual/en/function.date.php M - A short textual representation of a month, three letters Jan through Dec Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: cavagnaro [mailto:[EMAI

Re: [PHP] Month loop

2003-06-19 Thread Tyler Lane
On Thu, 2003-06-19 at 12:57, drparker wrote: > Is there any way I could loop thru and print all the month names (i.e. > January, February)? -- Tyler Lane <[EMAIL PROTECTED]> signature.asc Description: This is a digitally signed message part

Re: [PHP] Month loop

2003-06-19 Thread drparker
that's what I'm looking for - thanks. David Nicholson wrote: > Hello, > > This is a reply to an e-mail that you wrote on Thu, 19 Jun 2003 at 20:58, > lines prefixed by '>' were originally written by you. > > > Is there any way I could loop thru and print all the month names (i.e. > > January, Feb

RE: [PHP] Month loop

2003-06-19 Thread Dan Joseph
Hi, > Is there any way I could loop thru and print all the month names (i.e. > January, February)? I suppose you could do something like: for ($i = 1; $1 >= 12; $i++) { echo date("F", mktime(0, 0, 0, $i, 1, 2003)) . ""; } Unless you just want to m

Re: [PHP] Month loop

2003-06-19 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Thu, 19 Jun 2003 at 20:58, lines prefixed by '>' were originally written by you. > Is there any way I could loop thru and print all the month names (i.e. > January, February)? for($i=1;$i<13;$i++){ echo date("F",mktime(0,0,0,$i,1,1)); }

Re: [PHP] Month loop

2003-06-19 Thread CPT John W. Holmes
> Is there any way I could loop thru and print all the month names (i.e. > January, February)? Just make an array and loop through the array. You know the rest of the names, right? :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] month

2003-04-01 Thread Justin French
on 01/04/03 10:31 PM, Jason Wong ([EMAIL PROTECTED]) wrote: > I don't want to be awkward, but wouldn't $m be holding the required info > already? -- ignoring the fact that you have an invalid date. yes. I just re-read the OP... *slaps forehead*. Justin -- PHP General Mailing List (http://w

Re: [PHP] month

2003-04-01 Thread Jason Wong
On Tuesday 01 April 2003 17:49, Justin French wrote: > on 01/04/03 9:16 PM, Diana Castillo ([EMAIL PROTECTED]) wrote: > > how do you get just the month (in numeric format ) of a specific date. > > (not today) > > same for day and year. The date is in -dd-mm format to start with. > > thanks. >

Re: [PHP] month

2003-04-01 Thread Justin French
on 01/04/03 9:16 PM, Diana Castillo ([EMAIL PROTECTED]) wrote: > how do you get just the month (in numeric format ) of a specific date. (not > today) > same for day and year. The date is in -dd-mm format to start with. > thanks. If your date was -mm-dd, you could do this: But, because

Re: [PHP] month

2003-04-01 Thread Chris Hayes
At 12:16 1-4-03, you wrote: how do you get just the month (in numeric format ) of a specific date. (not today) same for day and year. The date is in -dd-mm format to start with. thanks. if you obtain it directly you should try to alter the way you get the date. If it is from e.g. a database o

Re: [PHP] Month Values in UNIX timestamps and workaround(Newbie)

2002-05-30 Thread 1LT John W. Holmes
What are you trying to accomplish over all? ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:37 PM Subject: [PHP] Month Values in UNIX timestamps and workaround(Newbie) I began to write a function that c