摘要: <?php $str = 'hello world'; //获取位置 $world = strpos($str,'world'); echo $world; 阅读全文
posted @ 2016-05-09 16:39 deneyZhao 阅读(2334) 评论(0) 推荐(0) 编辑
摘要: trim('') 去掉 字符串两端的空格 ltrim('')去掉 字符串左边 的空格 rtrim('')去掉 字符串右边的 空格 阅读全文
posted @ 2016-05-09 16:30 deneyZhao 阅读(303) 评论(0) 推荐(0) 编辑
摘要: <?php $i = 'i'; $love = 'love'; $you = 'you'; //通过. 对字符串 进行拼接 $h = $i.$love.$you; 阅读全文
posted @ 2016-05-09 16:27 deneyZhao 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 1:单引号初始化 $hello1 = 'hello1'; print_r($hello1); 2:双引号初始化 $hello2 = "hello2"; printf($hello2); 3:heredoc 语法结构初始化 $hello3 = <<<TAG hello3 TAG; echo $hell 阅读全文
posted @ 2016-05-09 16:19 deneyZhao 阅读(1943) 评论(0) 推荐(0) 编辑
摘要: <?php class Car { public $name = 'car'; //对象复制 public function __clone(){ $obj = new Car(); $obj -> name = $this->name; } } //初始化 一个 新的Car 对象 $a = new 阅读全文
posted @ 2016-05-09 16:12 deneyZhao 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 源码下载地址:https://github.com/Deneyzhao/ZLTabbarDemo.git 阅读全文
posted @ 2016-05-09 13:55 deneyZhao 阅读(208) 评论(0) 推荐(0) 编辑
摘要: - (NSDate *)getNowDateFromatAnDate:(NSDate *)anyDate { //设置源日期时区 NSTimeZone* sourceTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];//或GMT //设置 阅读全文
posted @ 2016-05-09 11:48 deneyZhao 阅读(3098) 评论(0) 推荐(0) 编辑
摘要: NSString *string = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 locale:[NSLocale currentLocale]]; NSRange range = [string rangeOfString:@"a" 阅读全文
posted @ 2016-05-09 11:30 deneyZhao 阅读(878) 评论(0) 推荐(0) 编辑