how to split the text file???
Moderator: General Moderators
how to split the text file???
i have a text file... which is of very heavy size.... do u guys have any tools to extract the text in easy way????
quick and diry that will parse a text file and split it up based on comma-delimited and space delimited ...
Code: Select all
$file_contents = file('styletest.css');
foreach ($file_contents as $num => $line_data)
{
$line_no = $num + 1;
$parsed_data = preg_split("/[\s,]+/", $line_data);
//do something...
}