排序
PHP 大小写转换、首字母大写、每个单词首字母大写转换相关函数
strtolower() 该函数将传入的字符串参数所有的字符都转换成小写,并以小定形式放回这个字符串 $str = 'Mary Had A Little Lamb and She LOVED It So'; $str = strtolower($str); echo $str; // P...
PHP实现字符串转义addslashes()和还原stripslashes()用法实例
PHP中addslashes() 函数返回在预定义字符之前添加反斜杠的字符串。 预定义字符是: 单引号(') 双引号(') 反斜杠(\) NULL stripslashes() 函数删除由 addslashes() 函数添加的反斜杠。 用...
PHP怎么判断函数,类,类方法是否存在
1、PHP判断系统函数或自己写的函数是否存在 if(function_exists('curl_init')){ curl_init(); }else{ echo 'not function curl_init'; } 2、PHP判断类是否存在 bool class_exists ( string $cla...