Blogger Information
Blog 43
fans 2
comment 2
visits 113556
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php 方法笔记
朝游东海
Original
974 people have browsed it

str_repeat() 函数

str_repeat() 函数把字符串重复指定的次数。

文档来源:http://www.w3school.com.cn/php/func_string_str_repeat.asp


echo json($data,JSON_UNESCAPED_UNICODE) 函数


echo json_encode("中文");    //"\u4e2d\u6587"

echo json_encode("中文", JSON_UNESCAPED_UNICODE);   //"中文"


str_ireplace() 函数

str_ireplace() 函数替换字符串中的一些字符(不区分大小写)。

把字符串 "Hello world!" 中的字符 "WORLD"(不区分大小写)替换成 "Shanghai":

<?php
echo str_ireplace("WORLD","Shanghai","Hello world!");
?>


array_keys()  //获取数组中的所有键名

$a=array("Volvo"=>"XC90","BMW"=>"X5","Toyota"=>"Highlander");
print_r(array_keys($a)); == Array ( [0] => Volvo [1] => BMW [2] => Toyota )




Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post