[PHP] Fmod with PHP 4.2.0 ?

2004-03-17 Thread BEOI 7308
Bonjour ...

My ISP's PHP is  4.2.0, and the fmod function was not available before
4.2.0

My question : is there a replacement to fmod, or what can i do to do a
fmod without it ?

Thanks in advance,

-Quentin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date comparison

2004-02-04 Thread BEOI 7308
Hi

I want to substract $first_date to $second_date and print the result
this way :

xx days, xx hours, xx minutes

i tried (strtotime($second_date)-strtotime($first_date)) but what i get
is a timestamp
and i dont know what to do with it

Is there already a function to print the result in a human readable way
?

Thx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with date('w')

2003-08-26 Thread BEOI 7308
i found out that using strtotime did the trick !!

?
strtotime($theday);
$theday = date(Y-m-d, time());
echo date((w), $theday);
?

  I have a problem with the date function
 
  ?
   $theday = date(Y-m-d, time());
echo date((w), $theday);
  ?

 I'm pretty sure the optional second argument for date is a unix timestamp
 that you would generate by using either time or mktime or strtotime.  You
 are passing it something in the form of Y-m-d, or 2003-08-23 when it is
 expecting 1061852640.
 http://www.php.net/manual/en/function.date.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with date('w')

2003-08-25 Thread BEOI 7308
Hi

I have a problem with the date function

?
 $theday = date(Y-m-d, time());
  echo date((w), $theday);
?

should print 1 if today is monday, 2 if today is tuesday ...
though it's printing 4 and today is monday !

any idea ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] show events by week in a HTML table

2003-08-20 Thread BEOI 7308
hi

i have a mysql table with events
ex : event 1,start time and day,end time and day
i'd like to print those events in a nice html table grouped by week
ex :
___|monday|tuesday|wednesday|
8:00|event 1|
9:00|event 1|
...

i already have a query to select all the events of the week, i just
don't know where
to start to print the events in a week view
any idea ?

thanks in advance
quentin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php