Replace your last line with this...

$date = $month . $mday . $year

Or take a look at the date() command... something like:

$date = date("mdy", time());

would do the same thing (check the man page for sure).


On Fri, 24 Jan 2003, Guru Geek wrote:

> Hello,
>
> I'm trying to use getdate() and then create a numeric value based on
> putting the month (numeric), the date, and the year all together, side
> by side in one variable.
>
> Here's my code:
> <?php
> $today = getdate();
> $month = $today['mon'];
> $mday = $today['mday'];
> $year = $today['year'];
>
> $date = $today['mon'.'mday'.'year'];
> ?>
>
> But all I get is a blank when I look at $date in the browser.  Any idea
> why that is?
>
> Thanks in advance,
> Roger
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to