解析php中的escape函數(2)_PHP教程
推薦:php獲取數組中重復數據的兩種方法(1)利用php提供的函數,array_unique和array_diff_assoc來實現 復制代碼 代碼如下: ?php function FetchRepeatMemberInArray($array) { // 獲取去掉重復數據的數組 $unique_arr = array_unique ( $array ); // 獲取重復數據的數組 $repeat_arr = array_diff_assoc (
一、編碼范圍
1. GBK (GB2312/GB18030)
x00-xff GBK雙字節編碼范圍
x20-x7f ASCII
xa1-xff 中文
x80-xff 中文
2. UTF-8 (Unicode)
u4e00-u9fa5 (中文)
x3130-x318F (韓文
xAC00-xD7A3 (韓文)
u0800-u4e00 (日文)
ps: 韓文是大于[u9fa5]的字符
正則例子:
preg_replace("/([x80-xff])/","",$str);
preg_replace("/([u4e00-u9fa5])/","",$str);
分享:解析PHP 使用curl提交json格式數據本篇文章是對PHP中使用curl提交json格式數據的實現方法進行了詳細的分析介紹,需要的朋友參考下 復制代碼 代碼如下: $data = array(name = Hagrid, age = 36); $data_string = json_encode($data); $ch = curl_init('http://api.local/rest/users'); curl_setopt($ch, C
- 相關鏈接:
- 教程說明:
PHP教程-解析php中的escape函數(2)。