How does the php program process the interval number in a string? I want to process a string and assign it to the variable to access the database, but the system always fails. When an interval number exists in a string, data after the interval number cannot be inserted. Process the English or numbers in the string. The problem is that there may be Chinese characters and separators in such strings! I want to replace this number with other symbols (single-byte symbols) when encountering an interval number. how can I determine this delimiter in the PHP program? & Nbsp; (how does the php program process the interval number in a string?
I want to process a string and assign it to the variable to access the database, but the system always fails. When an interval number exists in a string, data after the interval number cannot be inserted. Process the English or numbers in the string. The problem is that there may be Chinese characters and separators in such strings! I want to replace this number with other symbols (single-byte symbols) when encountering an interval number)
How can I determine this delimiter in a PHP program? (Ascii code A1A4 ). I searched the internet for half a day. Find only one php idea for processing Chinese characters
1. convert characters into ASCII (ord function) one by one to get the variables;
2. determine whether a variable belongs to a Chinese character
3. skip one character if it is a Chinese character and then judge the next one.
4. skip one character if it is not a Chinese character.
The question is how to determine the interval number?
Are there other methods?
------ Solution ----------------------
Addslashes ($ str)
Use a function to process the string to be added to the database. no error will occur when you add the string to the database.
------ Solution ----------------------
I have used fusioncharts and it feels good. There are basic graphics.
------ Solution ----------------------
Impossible!
To solve the problem, you need to view your code and data.
------ Solution ----------------------
How is your interval number defined? Simply find the character and replace it.
------ Solution ----------------------
If the data cannot be written to the database, you need to check your SQL statement. The second is whether the data format you want to insert meets the requirements. generally, if you do not need to replace it, the data can be successfully written to the database after conversion, otherwise, the rich text editor cannot be used?