Re: accessing localtime array directly
| From: | Chris Lee | Date: | Fri, 05 Oct 2001 21:43:07 +0000 |
| Subject: | Re: accessing localtime array directly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70145@lists.php.net to get a copy of this message | ||
there are functions like current() next() etc but they wont help you in this
case. I just wrote my own.
function index($array, $index)
{
return @$array[$index];
}
$now = index(localtime(), 7);
--
Chris Lee
lee@mediawaveonline.com
"John A. Grant" <jazrant@zsc.nrcan.zc.ca> wrote in message
news:20011005213312.11370.qmail@pb1.pair.com...
> In Perl I have done this:
> $julianday=(localtime)[7];
>
> Is there an equivalent syntax for PHP or do I just do:
> $now=localtime();
> $julianday=$now[7];
>
> I don't need it - I'm just curious about the syntax.
>
> --
> John A. Grant * I speak only for myself * (remove 'z' to reply)
> Radiation Geophysics, Geological Survey of Canada, Ottawa
> If you followup, please do NOT e-mail me a copy: I will read it here
>
>
>