My code:
$string="655:47 Text: 0 n\some more text here\t\2\r\3\tl\0\f0\\f1\\f2\\a0\0\a1\0\a2\255";
$a=explode("\\",$string);
var_dump($a);
While the output i get is:
array(7) {
[0]=>
string(33) "655:47 Text: 0 n"
[1]=>
stringl20) "some more text
0"
[2]=>
string(2) "f1"
[3]=>
string(2) "f2"
[4]=>
string(3) "a0"
[5]=>
string(3) "a1"
[6]=>
string(3) "a2"
}
I want to split the string on every '\' chat found ( and yet retain all the values) While I would like to have the function explode and to work correctly. How can I solve this ?