Re: weird foreach problem when calling date or getdate function, variable does not change
| From: | Miguel Cruz | Date: | Sun, 05 May 2002 06:56:20 +0000 |
| Subject: | Re: weird foreach problem when calling date or getdate function, variable does not change | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96118@lists.php.net to get a copy of this message | ||
On Sat, 4 May 2002, Zachary Buckholz wrote:
> $time = getdate($array[0]);
> print "$time[hours]:$time[minutes]:$time[seconds] = $chk_status = $resp_sec
>
> 20020504160503 <-- Notice how this date/time value is updated
> properly each loop
> 20:14:7 = 200 = 2 <-- Notice how this value always remains the same?
> 20020504160702
> 20:14:7 = 200 = 1
Those numbers don't look like timestamps to me (as they can't be larger
than about 4294967296). What they look like is the result of some imp or
perhaps even a gremlin breaking into your code and smooshing together
yearmonthdayhourminutesecond, then trying to PRETEND it's a timestamp.
Go back and read the date/time chapter of the PHP manual a little more
closely.
miguel