>       We have a meeting at every Saturday,I'd like to post the
> news and write the date of this Saturday every week,how can I get
> the date of Saturday.


This has not been tested, there might be a bug.
<?php
function get_sat_ts($timestamp){
        $dow = date("w",$timestamp);
        $days_to_add = 6 - $dow;
        $ts_sat = mktime
(0,0,0,date("m",$timestamp),date("d",$timestamp)+$days_to_add,date("y",$time
stamp));
        return ($ts_sat);
}
$ts = get_sat_ts(time());
echo date("Y-d-m",$ts);
?>

Something like that should be what you want though.




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

Reply via email to