I wanna have an array like the following:
$my_array = array("\", "\\");
But the elements in my array cause problems because the slashes are considered as escape characters. How do I create a PHP array that contains those elements please?
I wanna have an array like the following:
$my_array = array("\", "\\");
But the elements in my array cause problems because the slashes are considered as escape characters. How do I create a PHP array that contains those elements please?
You are to duble them:
$my_array = array("\\\\", "\\");
print_r($my_array);
So that the seeing two slashes the second one is written. In case of double slashes you are to make 4 of them.