I'm not sure if you specifically need the split function or not. I usually use the index() and rindex() function to seperate the directory paths from each other. For example: if you want to split c:\program files\software\specific. And you wanted to split "specific" from the the rest of the directory path. I would do the following:
-
-
#you want to add 1 because you want to skip "\"
-
$index_num = rindex($_, "\") + 1;
-
-
#specific would be saved in $filename
-
$filename = substr($_, $index_num);
-
-
#the directory would be saved into $directory path
-
$dir_path = substr($_, 0, $index_num);
-
-