Re: [PHP-DB] Converting the Month from a word into the numerical expression

2005-10-07 Thread Jeffrey

Ron Piggott wrote:


I have the word for the month stored in the variable $month   In this
example $month may be equal to June.  I wonder if there is a way to use
the DATE function to convert this into a numberical expression --- in this
example 06   Ron

 


Indeed there is: strtotime
See http://php.belnet.be/manual/en/function.strtotime.php

Good luck,

Jeffrey

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Converting the Month from a word into the numerical expression

2005-10-07 Thread Bastien Koert


Whoops misunderstood the other one

$month = Date(m,strtotime($month));

Another option is to use an array and then invert it to get the value

$month=Jun;
$Months = array(Jan,Feb,Mar...Dec);
$Inv_Month = array_flip($Months);
$month_num = $Inv_Month($month);

bastien


From: Ron Piggott [EMAIL PROTECTED]
Reply-To: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] Converting the Month from a word into the numerical 
expression

Date: Thu, 6 Oct 2005 23:09:43 -0500

I have the word for the month stored in the variable $month   In this
example $month may be equal to June.  I wonder if there is a way to use
the DATE function to convert this into a numberical expression --- in this
example 06   Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: domxml_open_mem and cdata

2005-10-07 Thread Matthias Willerich
so far no reply, but a little update:
I uploaded it to a linux server, similar setup(PHP4, apache1.3.something),
same problem.
Any ideas for a work-around? What do you use to edit XML on the
(php-)server? I don't have enough time to redo it for MSXML

Cheers,
Matthias

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php