Use strtotime().
$result = mysql_query("SELECT datefield FROM mytable");
$row = mysql_fetch_array($result);
$datevar=strtotime($row['datefield']);
echo date('m-d-Y', $datevar);
Regards,
"David Johansen" <[EMAIL PROTECTED]> wrote:
> I was just wondering if there's any way to work with dates ret
Alberto Wagner wrote:
> Why everyone uses $foo or $foobar as examples?
>
>
>
foo
/foo/ 1. interj. Term of disgust. 2 [very common] Used very generally as a
sample name for absolutely everything, esp. programs and files (esp. scratch
files). 3. First on the list of metasyntactic variables used in
declare and initialize all variables, but I
need my scripts to run as fast as they can (and I'm too lazy to check every
variable before I use it, too :-)
So... do I have any choice?
Regards,
Ernesto
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to a file and then including it, but
I want to know if there's a better way.
As I'm going to do this all the time, I prefer not to create temporary
files (so I don't slow down everything).
Any ideas?
Thanks in advance,
Ernesto
--
PHP General Mailing List (http://www.php.net/)
To
Hi,
Obviously this is somewhere in the FM, which I've (almost) read, but I
can't find an answer to:
How do I convert a string containing an ODBC date (-MM-DD HH:MM:SS)
to a date variable, which I can format usging date()?
Thanks in advance,
Ernesto
--
PHP General Mailing
ning WebSite Pro 2.4 and
PHP 4.0.6 (one Windows 2000 Advanced Server and the other Windows XP Pro).
Is this a PHP bug, a WebSite bug or my code?
I don't think I screwed something up because I'm not playing with the
headers here.
Any ideas?
Regards,
Ernesto
--
PHP General Mailing
e many nested inclusions
(not recursion, just including a file in an included file wich at it's
time is included in another, etc.).
Regards,
Ernesto
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
nction to import the query string from apache ambient.
> This is not a bug, maybe the index.php?1 isn't standard at all.
> "Ernesto" <[EMAIL PROTECTED]> ha scritto nel messaggio
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>Hi,
>>
&
uot;, $HTTP_GET_VARS['s'] is 1, but I need the raw
query string because it's something like "index.php?1".
Is this a known bug on PHP/WinXP?
Regards,
Ernesto
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Brian C. Doyle wrote:
> Hello all,
>
> Does PHP have the ability to control a serial port? I see we can use
> the Printer but that was All I saw.
>
>
>
I guess you may fopen COM1: or COM2:
You should be able to fopen PRN: or LPT1: as well.
--
PHP General Mailing List (http://www.php.ne
Hi there... newbie here!
How do I do server-side redirection?
I want to redirect the user to another URL without using javascript.
Regards,
Ernesto
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
esult($ex);
I guess both resources are freed, but I just want to make sure because I do
this all the time (because the old code I'm porting does it (because it's
ok to do it in _that_ language) (and I'm too lazy to rework it)).
Thanks in advance.
Regards,
Ernesto
--
PHP Gener
12 matches
Mail list logo