Re: [PHP] Month with leading zeros

2008-05-11 Thread Casey
On 5/10/08, Ron Piggott [EMAIL PROTECTED] wrote: I am wanting to change echo option value=\ . $months[$month] . \; 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

Re: [PHP] Month with leading zeros

2008-05-11 Thread Jim Lucas
Ron Piggott wrote: I am wanting to change echo option value=\ . $months[$month] . \; 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 ?php $months = array('1' = 'January',

Re: [PHP] Month with leading zeros

2008-05-11 Thread Jim Lucas
Jim Lucas wrote: Ron Piggott wrote: I am wanting to change echo option value=\ . $months[$month] . \; 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 ?php $months =

[PHP] Month with leading zeros

2008-05-10 Thread Ron Piggott
I am wanting to change echo option value=\ . $months[$month] . \; 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 ?php $months = array('1' = 'January', '2' = 'February',

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 option value=\ . $months[$month] . \; 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 ?php $months

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

[PHP] Month

2007-02-19 Thread Dan Shirah
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 value fro January

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

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

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

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 SELECTED

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 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 only

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 for the amount of digits returned. If less

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
/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 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 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 try to save my form Incorrect syntax

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
] 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 of $m would be checked for the amount of digits returned. If less

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
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 added to the front, correct? Yes. % = start of format string 0 = padding

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
option value=\.sprintf(%02d, $m).\$months/option; } ? /select 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

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
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 Incorrect syntax near 's'. select name=month ?PHP for ($m=1;$m=12;$m

Re: [PHP] Month

2007-02-19 Thread Dan Shirah
[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 try the sprintf I get the following error when I try to save

[PHP] Month display calendar

2007-01-19 Thread Denis L. Menezes
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/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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/) To

[PHP] Month in a numeric form

2006-10-15 Thread Ron Piggott (PHP)
Is there a way I am able to use the DATE command to convert January to 1, February to 2, etc.

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

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!!!

[PHP] Month name

2003-06-25 Thread cavagnaro
How can I get the month name from a date? If you could post with an example i'll be gratefull -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Month name

2003-06-25 Thread Boaz Yahav
:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 8:31 AM To: [EMAIL PROTECTED] Subject: [PHP] Month name How can I get the month name from a date? If you could post with an example i'll be gratefull -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] Month name

2003-06-25 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-25 Thread cavagnaro
/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: cavagnaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 8:31 AM To: [EMAIL PROTECTED] Subject: [PHP] Month name How can I get the month name from a date? If you could post with an example i'll

[PHP] Month loop

2003-06-19 Thread drparker
Is there any way I could loop thru and print all the month names (i.e. January, February)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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:

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;$i13;$i++){ echo date(F,mktime(0,0,0,$i,1,1)); } For

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)) . br; } Unless you just want to

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, February)?

Re: [PHP] Month loop

2003-06-19 Thread Tyler Lane
?php $months = array(, January, February, March, April, May, June, July, August, September, October, November, December); foreach( range( 1, 12 ) as $month ) { print $months[ $month ]; } ? On Thu, 2003-06-19 at 12:57, drparker wrote: Is there any way I could loop thru and print all the

[PHP] month

2003-04-01 Thread Diana Castillo
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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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. If your

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*. ? $date = '2002-03-18'; list($y,$d,$m) =

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

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

2002-05-29 Thread webmaster
I began to write a function that correctly diveded up the months into their correct UNIX timestamps and wrote content from a database accordingly. I have had an idea that maybe eaiser to implement but slower. Could one or two people tell me what the think and if it is a good idea. I am