Re: Interesting date



Gunnar G wrote:

$old = getdate(strtotime("-250 days"));
and I get right now with
$old["mon"] and $old["mday"]
31 june. Well, that doesn't sound right.

I get $old["mon"] as "5" -- that is, May, not June.

PHP numbers months starting with January as 1. This is different from
Perl's "time" and "gmtime" functions, which number months starting with
January as 0.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
.



Relevant Pages

  • Re: Is PHP the right language for this application (described below)? If not, any suggestions?
    ... "potential" is an offer to share the profits (business model is a ... sound one) - thanks for pointing it out, I'll be clearer in my next ... PHP and MySql would be fine ...
    (comp.lang.php)
  • Re: PHP & sound system
    ... editor and play mp3's through the sound system on the server through ... I suspect it may be easier to attach a player to a streaming source ... generated with php than trying to control the player via PHP (but I ... believe mplayer and amarok do provide runtime control APIs). ...
    (comp.lang.php)
  • Re: Binary? I dont know
    ... That doesn't sound like the right approach to me though. ... PHP will have ... that browsers use. ... the PHP side will be trivial, as PHP will save the posted data in a file ...
    (comp.lang.php)
  • Re: Creating a grocery list
    ... I'm new to PHP and wonder if anyone has a good learning example to share? ... Humm, that's an interesting idea and doesn't sound very complicated. ...
    (alt.php)
  • Re: include function in stylesheet
    ... Edwin van der Vaart wrote: ... use php to pick the ones you want for each page. ... Sound interesting. ...
    (alt.html)