What does this code mean? I haven't understood it for more than an hour. thank you! $ Patt = array ('/public','/index. php/Article/detail ',' _ CONTROL _ ',' _ WEB _ ','/index. php ');
$ Replace = array (' ',' ',' ',' ',' ');
$ Content = str_ireplace ('../public ',' ', $ Content );
$ Content = str_replace ($ patt, $ replace, $ content );
Reply to discussion (solution)
String replacement!
In $ content
/Replace Public
/Index. php/Article/detail
Replace _ CONTROL _
_ WEB _ replace
/Replace index. php
../Replace public
I cannot understand this. I should go back to the tutorial basics.
$ Replace = array (' ',' ',' ',' ',' ');
I have never written this way.
$ Replace = array (' ',' ',' ',' ',' ');
I have never written this way.
$ Replace = array (' ',' ',' ',' ',' ');
The red part is only the key value of the array.
Answer the LZ question. the str_replace parameter can be an array.
Thank you for understanding. it is really a beginner.