String processing problem preg_replace (), there is a strange substitution, Daniel solve!
http://.com/item.htm?id=14135039282&ref=http%3A%2F%2Fsearch8.taobao.com%2Fsearch%3Fq%3D%25C4%25DA%25BF% 25e3%2b%25c4%25d0%26cat%3d50026972%26commend%3dall%26style%3dgrid%26ppath%3d2048150%253a105206%26cps%3dyes% 26pid
Above is the original string, why go through the following processing
', Htmlentities ($rw [' content '],ent_quotes,gb2312)])?>
After processing is shown like this, please note that after the number of the automatic line, there is no way to make sense
Http://.com/item.htm?
id=14135039282&ref=http%3a%2f%2fsearch8.taobao.com%2fsearch%3fq%3d%25c4%2
Also ask a question, the database is such a stored string
I
I
I
I
And after ', Htmlentities ($rw [' content '],ent_quotes,gb2312)]?> This process, it appears as follows
I
I
I
I
Why do you have to replace the space here, in the inner layer of the pattern to add \ nthe above situation will not appear
------Solution--------------------
No more solving, this is not a problem at all, even if Echo comes out directly,? The next line, the browser put the string between the question mark as a word processing, the word length of more than one screen to return line, with Word to edit the English language when the same effect, so it is only browser-related reasons
You can put a question mark in the following paragraph and adjust the width of the browser try
PHP code
"!--? Phpecho" http://.com/item.htm?id=14135039282& ref=http%3a%2f%2fsearch8.taobao.com%2fsearch%3fq%3d%25c4%25da%25bf%25e3%2b%25c4%25d0%26cat%3d50026972% 26commend%3dall%26style%3dgrid%26ppath%3d2048150%253a105206%26cps%3dyes%26pid ";