Hi all
Is there a way to stop the backslashes from being removed from my string? Any help is really appreciated...this is driving me crazy.
This is my code..I need to keep the slashes.
$string = 'C:\\xampp\\htdocs\\Website\\images\\';
If you want two slashes, you need to use four slashes.
Alternatively, use forward slashes. Most people do this because Windows and Unix will accept them as a path.
i.e.
C:/xampp/htdocs/Website/images