博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1.与时间相关的

 ---使用strtotime()函数把你的字符串时间转化为unix时间戳,然后使用date()输出    
  $time_str   =   "2005-08-09   12:54:31";  
  $time   =   strtotime($time_str);  
  echo   date("Y-m-d",   $time); 

 ---date('w', mktime(0, 0, 0, $this->month, $this->day, $this->year ));

 

2.string to int

$str="123";

$value=(int)$str;

posted on 2010-03-31 15:50  Likwo  阅读(178)  评论(0编辑  收藏  举报