You can replace '\' with '/' and '/' with '\' in PHP
Example
replace \ with /
echo str_replace('\\','/','Hi\Mi');
output: Hi/Mi
replace / with \
echo str_replace('/','\\','Hi/Mi');
output: Hi\Mi
Example
replace \ with /
echo str_replace('\\','/','Hi\Mi');
output: Hi/Mi
replace / with \
echo str_replace('/','\\','Hi/Mi');
output: Hi\Mi
No comments:
Post a Comment