Home  >  Article  >  Backend Development  >  Detailed explanation of solving the problem of inconsistent PHP string lengths

Detailed explanation of solving the problem of inconsistent PHP string lengths

jacklove
jackloveOriginal
2018-07-03 18:03:162486browse

The following editor will share with you an article to solve the problem of inconsistent PHP string lengths. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor and take a look.

is as follows:

$paramStr = iconv("UTF-8", "GB2312//Ignore", $paramStr); 
$paramStr = iconv("GB2312", "UTF-8//Ignore", $paramStr);

These two sentences can solve it.

The above article on solving the problem of inconsistent PHP string lengths is all the content shared by the editor. I hope it can give you a reference, and I hope you will support the PHP Chinese website.

Articles you may be interested in:

Command line execution of $argv and $argc configuration methods in php script_php instance

thinkphp5 public methods for uploading images and generating thumbnails

Detailed explanation of the asynchronous notification and verification processing order method of calling the SDK after payment in the WeChat applet

PHP implementation of using Echarts to generate data statistical reports

PHP determines the operator based on the mobile phone number

The above is the detailed content of Detailed explanation of solving the problem of inconsistent PHP string lengths. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn