摘要: <?php // array_walk() array_map() array_filter() // 可以使用用户自定义的函数对数组中的a56爆大奖在线娱乐元素做回调处理 成功返回true 失败返回false $fruits = array('a'=>'apple','b'=>'banana', 'o'=>'or 阅读全文
posted @ 2024-07-08 21:59 宋霸霸 阅读(0) 评论(0) 推荐(0) 编辑
摘要: <?php $url = 'http://chlop.io?www=23233s&timestamp=23232'; //&times X echo '<hr>'; echo parse_url($url)['query']; echo '<hr>'; echo htmlspecialchars(p 阅读全文
posted @ 2024-07-06 22:58 宋霸霸 阅读(4) 评论(0) 推荐(0) 编辑
摘要: <?php // 1.单引号定义字符串 // 2.双引号定义字符串 // 3.定界符定义字符串 // 1.单引号定义字符串 // echo 'this is 'my' mother'; echo 'this is \'my\' mother <br>'; // 单引号不能解析转义符\n 换行 \t 阅读全文
posted @ 2024-07-06 10:48 宋霸霸 阅读(1) 评论(0) 推荐(0) 编辑
摘要: <?php // php运算符 // 1.算数运算符+ — * / %取余 取模 余数一定是一个正整数 // printf('5/3的余数是:%d<br>',(5%3)); // 计算闰年 // $year = date("Y"); // echo $year; // if($year % 4 == 阅读全文
posted @ 2024-07-04 18:35 宋霸霸 阅读(2) 评论(0) 推荐(0) 编辑
摘要: <?php // 命名函数是全局成员 不受作用域的限制 // 匿名函数,闭包 closure 允许临时创建一个没有名字的函数 echo getName('蓝波宝宝'); function getName($name) { return" 欢迎{$name}来到phpp中文网做客<br>"; } // 阅读全文
posted @ 2024-07-04 00:51 宋霸霸 阅读(4) 评论(0) 推荐(0) 编辑
摘要: <?php // php的打印与输出 // 1.echo"显示"输出内容到浏览器 没有返回值 // 2.print'打印' 有返回值 可用于三元运算符中 // var_dump()可以返回变量的完整信息 // 4.print_r()打印输出数组,第二个参数设置为true 可以将变量的信息转换成字符串 阅读全文
posted @ 2024-07-02 23:10 宋霸霸 阅读(4) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php ech 阅读全文
posted @ 2024-07-02 09:55 宋霸霸 阅读(4) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2024-06-29 23:52 宋霸霸 阅读(5) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2024-06-28 23:48 宋霸霸 阅读(5) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2024-06-27 23:22 宋霸霸 阅读(5) 评论(0) 推荐(0) 编辑