[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 = date(z Y,

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: ?php $year = '2005'; $time = strtotime(1

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 php-general@lists.php.net Sent: Wednesday, September 07, 2005 5:03 PM Subject: RE: [PHP]

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
M. Sokolewicz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip or, easier, simply make this script: ?php 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 Brian

[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 Sundays, just

[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, Is it possible to get the number of saturdays and sundays for a given month / year? Thanks for your

Re: [PHP] kein Betreff

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.net/)

[PHP] Weird results of ==

2005-08-23 Thread Brian P. O'Donnell
Hello I have the following code: ? $a = 252.73; $b = 252.73; $c = 0; if ($a == ($b + $c)) { // do the first thing } elseif ($a ($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

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 + $c)) { // do the first thing } elseif ($a ($b + $c)) { // do