php日期查询与数值转换的例子
例子,php实现日期查询:
<?php
$today=date("Y-m-d");
echo $today .'<br>';
echo date("Y-m-d",strtotime("2009-08-03 14:55:02")).'<br>';
echo date("Y-m-d H:i:s").'<br>';
echo time();
addtime between '".$r1." 00:00:00' and '".$r2." 23:59:59'
addtime between ' 2009-08-03 00:00:00' and '2009-08-03 23:59:59'
有关字符串替换函数 str_replace(find,replace,string,count)
find必需。规定要查找的值。replace必需。规定替换 find 中的值的值。string必需。规定被搜索的字符串。count可选。一个变量,对替换数进行计数。
str_ireplace()就可以执行对大小写不敏感的搜索
字符串分割成数组:
xx=explode('|', $str) xx[0]取值
您可能感兴趣的文章:
php日期查询与数值转换的例子
php mysql查询指定范围内日期
php与Mysql日期时间(UNIX时间戳、格式化日期)转换的方法
PHP汉字拼音转换、公历农历转换的实例详解
php查询指定日期范围内数据
mysql查询今天,昨天,近7天,近30天等数据
php日期函数的简单示例代码
mysql 时间段查询语句大全
php mysql日期操作的小例子
Javascript时间戳与php时间戳转换时要注意什么