马冲的博客

导航

随笔分类 -  常用函数

常用的字符串函数-S
摘要:header('content-type:text/html;charset=utf-f'); /* $var=addslashes($_GET['username']);//转义表单提交内容中的引号等 echo $var;//dsaas\"cd */ /* //0-9 48-57 A-Z 65-90 a-z 97-122 //chr — 返回指定的[A... 阅读全文

posted @ 2018-11-07 01:02 马冲的博客 阅读(368) 评论(0) 推荐(0)

常用的数组函数-S
摘要:header('content-type:text/html;charset=utf-8'); //声明一个数组 $arr=['one'=>'aaa','two'=>'bbb','three'=>'ccc','four'=>'ddd']; var_dump($arr); //array_change_key_case — 返回[字符串]键名全为小写或[大写]的数... 阅读全文

posted @ 2018-11-07 01:00 马冲的博客 阅读(356) 评论(0) 推荐(0)

常用的数学函数-S
摘要:// abs — 获取[数值]的绝对值 $int=-2; echo abs($int).''; $float=-2.34; echo abs($float).''; //ceil — 把一个[浮点数]进一法取整 返回大于此浮点数的临近整数 $float=2.3; echo ceil($float).''; $float=... 阅读全文

posted @ 2018-11-07 00:59 马冲的博客 阅读(313) 评论(0) 推荐(0)