If i want to split: home/user/publicHTML/blah/folder/filename.jpg into
[0] => home/user/publicHTML/blah/ [1] => folder/filename.jpg
I use preg_split right?
I guess i need help with the pattern
Ok... I got my split working... $file = preg_split('/whatever/i', $file) ;
but i'm having a hard time esacping the backslashes.... like if i want to split off C:\folder\folder2... $file = preg_split('/C:\folder\folder2/i', $file) ;
double up the back slashes?
$file = preg_split('/C:\\folder\\folder2/i', $file) ;
When you backslash anything (in this case another backslash you cancel it out.
You would need three backslashes
$file = preg_split('/C:\\\folder\\\folder2/i', $file) ;
yeah thanks... got it