Space that cannot be removed by trim (), chr (161 ). A user submits an article. Before the content of the string submitted by POST is written to the database, trim removes the leading and trailing spaces of each row. However, some paragraphs that are submitted to the database still have a short space before them. It cannot be removed. He is neither s nor nr. he uses the ord () function to query whether his value is equal to & nbsp; 161. but how can he remove the null at the beginning. ------ Space that cannot be removed by trim (), chr (161 ). A user submits an article.
Before the content of the string submitted by POST is written to the database, trim removes the leading and trailing spaces of each row.
YesThe content submitted for writing to the database is still a small space before some paragraphs. It cannot be removed. It is neither \ s nor \ n \ r \ 0.
Ord ()The value of the function query is equal to 161, but how to remove the null at the beginning.
------ Solution --------------------
Trim ($ s, "\ r \ n". chr (161 ))