I am trying to do a simple find and replace within a string with:
$share_name = str_replace(" ", "\ ", $share_name );
Unfortunately for some reason it replaces all the spaces with "\\ " instead of "\ ". Does anybody know whats going on and how to solve this problem?