-
Yours,It's the biggest support for me.,If you don't understand, you can continue to ask pkaust8 effect for a loop output:
arr = explode("#####",$str);
foreach($arr as $a){
echo $a."
Effect 2: Get the first path:
arr = explode("#####",$str);
echo $arr [0]";
-
** on the 1st floor is a bit of a problem Intercepting Chinese will have problems For example, it is exactly 9 letters and 1 Chinese character, if you intercept 10 digits, there will be garbled characters, so when intercepting strings containing Chinese, you should use mb substr instead of substr
for($i=0;$istring=mb_substr($str,$i,10);
echo $string."
Seek satisfaction.
-
There's a bit of a problem upstairs. Also consider the format of the string. And whether the string contains Chinese...
-
Intercept them one by one and put them into an array.
-
php Chinese.
Causes and solutions of garbled characters.
Reason: The encoding type of the page language itself is not suitable, at this time, the Chinese you write directly in the script must be garbled, not to mention the database;
Workaround: Select'
utf8 or'gb2312', so that the customer's browser automatically selects and appears correctly in Chinese. Note:'utf8'or'gb2312'can display Chinese correctly.
2.The encoding type in the database mysql is incorrect.
Solution: When creating a database, use mysql
Character set selection'utf8',mysql
Connect to proofread UTF8 General CI, so that the created database is used to store Chinese must have no problem, otherwise, your Chinese is garbled in MySQL first, let alone expect it to display correctly in PHP pages for you.
3.It is related to the usual scripting environment. For example, some of the content is written by yourself in Word, some is written in Notepad, and some is written in EditPlus, UltraPlus, etc.
Texter. Sometimes I write Chinese directly in dw, so it's strange that there is no garbled characters.
Solution: Try to use the same device. If you want to copy the existing content, it is recommended to use the encoding conversion function in UltraPlus to convert it to UTF8 or GB2312.
It doesn't matter what type you convert to, it's your PHP
web applications.
The coding in should be consistent.
4.Programmatic access.
MySQL, we recommend that you add a line **:MySQL query(.)."set
namesgbk'");
Here's how to fix it.
I didn't understand you.
Paste on the program.
So give you some ways to solve the problem of garbled characters.
Hope it helps.
-
Causes and solutions of php Chinese garbled characters.
Reason: The encoding type of the page language itself is not suitable, at this time, the Chinese you write directly in the script must be garbled, not to mention the database;
Workaround: Select'utf8'or'gb2312', so that the customer's browser automatically selects and appears correctly in Chinese. Note:'utf8'or'gb2312'can display Chinese correctly.
2.The encoding type in the database mysql is incorrect.
Solution: When creating a database, use mysql
Character set selection'utf8',mysql
Connect to proofread UTF8 General CI, so that the created database is used to store Chinese must have no problem, otherwise, your Chinese is garbled in MySQL first, let alone expect it to display correctly in PHP pages for you.
3.It is related to the usual scripting environment. For example, some content is written in Word, some is written in Notepad, and some is written in texters such as EditPlus and UltraPlus.
Sometimes I write Chinese directly in dw, so it's strange that there is no garbled characters.
Solution: Try to use the same device. If you want to copy the existing content, it is recommended to use the encoding conversion function in UltraPlus to convert it to UTF8 or GB2312.
It doesn't matter what type you convert to, it's your PHP
The coding in the web application should be consistent.
4.Programmatic access.
MySQL, we recommend that you add a line **:MySQL query(.)."set
names'gbk'")
Here's how to fix it.
I didn't understand the program you posted.
So give you some ways to solve the problem of garbled characters.
Hope it helps.
Hello landlord.
It's a bit winding with recursion, but you can actually use a loop to reverse the string. >>>More
Two methods:
1: fileext=right("images/", 3) two: filename="images/" >>>More
db->get_results('select * from '.tb_prefix.'product where categoryid=10'); >>>More
It seems to be BAT, and it is difficult to achieve it with the following methods. >>>More
First of all, it is necessary to understand what a binary tree is (and I guess the subject also understands). >>>More