Re: [PHP] mktime

2005-09-12 Thread Brian P. O'Donnell
"Jasper Bryant-Greene" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Brow wrote: > > A little confused with mktime, I'm trying to get how many days are in a > > year. > > How about doing it differently. I'd tackle this problem like this: > > $year = '2005'; > $time = strtotime

[PHP] Re: mktime

2005-09-12 Thread Brian P. O'Donnell
"Dan Brow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > A little confused with mktime, I'm trying to get how many days are in a > year. > > $year = "2006"; > $epoch = mktime(0, 0, 0, 1, 0, $year); // I have to have 1 for month or > I get which day it is now. Which sucks. > $date =

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > or, easier, simply make this script: > echo PHP_INT_MAX; > ?> > > and you're done :P The maximum integer value is stored in PHP_INT_MAX as > of 4.4.0 and PHP 5.0.5 > > before that, you had to use a way as the one Bri

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
""Gustav Wiberg"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original Message - > From: "Shaw, Chris - Accenture" <[EMAIL PROTECTED]> > To: "Gustav Wiberg" <[EMAIL PROTECTED]>; "PHP General" > > Sent: Wednesday, September 07, 2005 5:03 PM > Subject: RE: [PHP] Intege

[PHP] Re: Saturdays and Sundays

2005-09-01 Thread Brian P. O'Donnell
Sorry, I made a mistake. See below: ""Brian P. O'Donnell"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > ""Shaun"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > >

[PHP] Re: Saturdays and Sundays

2005-09-01 Thread Brian P. O'Donnell
""Shaun"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Is it possible to get the number of saturdays and sundays for a given month > / year? > > Thanks for your help. Here's another way to do it. Each function will return either 4 or 5. If you need both Saturdays and Sund

Re: [PHP]

2005-08-29 Thread Brian P. O'Donnell
It's bad enough when somebody posts a blank email to the list, but when people start posting blank replies, it gets really frustrating. Please cease & desist. Thanks Brian "Andy Pieters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Weird results of "=="

2005-08-23 Thread Brian P. O'Donnell
That did the trick. Thanks a million. Brian "Jasper Bryant-Greene" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Brian P. O'Donnell wrote: > > > > > $a = 252.73; > > $b = 252.73; > > $c = 0; > > > > if ($a == ($b +

[PHP] Weird results of "=="

2005-08-23 Thread Brian P. O'Donnell
Hello I have the following code: ($b + $c)) { // do the second thing } elseif ($a < ($b + $c)) { // do the third thing } ?> Each of the three variables is derived by some earlier calculation, but for testing purposes I have made sure that they end up being $a = $b and $c = 0. I have tested for