Php/** * Chinese Pinyin First Letter tool class * Note: English strings: Unchanged returns (including numbers) eg. abc123 = abc123* Chinese string: Returns the phonetic first character eg. test string = cszfc* Chinese-English mixed string: Returns
This article mainly introduces php's method of randomly dividing strings into arrays of different lengths, involving techniques related to random numbers and string operations, for more information about how php splits strings randomly into arrays
For Chinese PHP programming under UTF8, read Chinese PHP programming under UTF8. To be honest, sandal also thinks UTF8 is a good thing ...... After all, the screen shows that China, Japan, and South Korea are very attractive to East Asians ......
PHP Beginners FAQ set correction version (21 Q & ). 1. how to connect two strings? A: You can use ". "Operation symbol, such as $ newStrZhang. san. in java, the "+" operator is used. 1. how do I connect two strings?
A: You can use ". "Operation
Phpstrlenmb_strlen calculates the length of a mix of Chinese and English strings. Comparison between strlen and mb_strlen when the characters are all English characters, the two are the same. Here we will mainly compare the two calculation results
This article mainly introduces php's method of randomly dividing strings into arrays of different lengths, involving techniques related to random numbers and string operations, for more information about how php splits strings randomly into arrays
Php string truncation problem. However, when English and Chinese characters are mixed, the following problem occurs: if there is such a string $ str, this is a string; to intercept the first 10 characters of the string, if (strle) is used, the
I have found that object-oriented design is too serious to be overlooked. Use the OOP language, but not object-oriented design. It is nothing more than writing C programs with classes, and this is a common situation. The other is to over-emphasize
Look at the code first
function reverse ($str) { if (strlen ($STR) >0) { reverse (substr ($STR, 1)); Echo substr ($STR, 0,1); return;} } Reverse ("ABCDEFG");//GFEDCBC
In the above example, I think that understanding is a circular
We are using
For the reverse order of strings, the PHP function Strrev () has the following test code:
header (' content-type:text/html; CharSet = UTF -8 ');
$ Str = implode (', Range (9, 0));
print ' p>strong>before reversed:
PHP has an extremely powerful image processing capability, which makes it easy to dynamically generate web images.
is a simple counter made using PHP.
1. General ideas:
Record the number of previous visits in a text file, and when the page is
When the SMS format is 8:UCS2 encoded, the Unicode hexadecimal encoding needs to be converted to UTF8, but PHP does not have built-in Unicode support.
/* ** Convert Unicode hexadecimal string to UTF8 text string* @param mixed $str The string to
A two-way encryption/decryption method (php) Based on hexadecimal conversion & lt ;? // madebyhuyang @ 2005-01-20 | 11-04-06 Base on hexadecimal conversion
// Made by huyang @ 2005-01-20 | 11-04-06# Use n-carry to m-carry#0 ~ 9A-Z, which can
[C-sharp: showcolumns] · 40 · ····· · 90 ··· · 140 · 150/// /// numeric string /// string converted to an uppercase Chinese character or error message Public string ConvertSum (string str){If (! IsPositveDecimal (str ))Return "the input is not a
This post was last edited by Iamsai on 2013-09-24 21:00:08
0) { reverse_i (substr ($STR, 1)); } Echo substr ($STR, 0,1); return;}? >
Please look at my question:
The output of this program is the reverse output
UTF encoding
The UTF-8 is to encode the UCS as a 8-bit unit. The encoding from UCS-2 to UTF-8 is as follows:
UCS-2 encoding (16 binary)
UTF-8 byte stream (binary)
0000-007f
0xxxxxxx
0080-07ff
110xxxxx 10xxxxxx
0800-ffff
1110xxxx 10xxxxxx
Share a php-made Chinese pinyin first letter tool class,
The code is very simple, here is not many BB, we read the comments, comments do not understand the small partner, beg to leave php!!!
Copy CodeThe code is as follows:/*** Chinese Pinyin first
I am also a novice php, through W3cschool to understand the basic principles of PHP after the write. But still rookie.First, regardless of 3DES encryption method is right, methods are online, in the run time reported a mistake, the younger brother
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.