Flipkart

Friday, February 26, 2010

PHP: Read the whole file into array

function read_file_at_array($file){

$content = file_get_contents($file);

$lines = preg_split('/\n/', $content);

return $lines;

}

No comments:

Post a Comment