SyntaxFix
Write A Post
Hire A Developer
Questions
It's overly-complicated and ugly but in my opinion this is the way to go:
$fp = fopen("php://memory", 'r+'); fputs($fp, $data); rewind($fp); while($line = fgets($fp)){ // deal with $line } fclose($fp);