View Single Post
Old 07-24-2009, 05:33 PM   #1 (permalink)
Sam Granger
The Acquainted
 
Join Date: Sep 2007
Posts: 126
Thanks: 4
Sam Granger is on a distinguished road
Default Some questions about file_get_contents

How do I manage to get the following, but with file_get_contents instead of fopen?

PHP Code:
$fp fopen($filename'r');
$content implode(''file($filename));
$content_array explode($seperator$content); 
I tried quite a few things, all without success..

My second question, I know file_get_contents is faster than fopen, reason why I'm using it. But is it more efficient for what I'm using fopen to do? I'm wanting to use this to convert a CSV into an array.
Sam Granger is offline  
Reply With Quote