I have urgent need of the function stream_get_line:
http://www.php.net/manual/en/functio...m-get-line.php
which as you can see is only P5 and above. So I went and got the PHP5
source, hoping to find this function and copy it into my script.
found php_streams.h
don't really know what to do with it...I'm learning a little bit of C but
not enough, I suspect.
Is this a fool's hope? Is there an existing (4.3) function that can be
tweaked to do the same job?
If you're still with me, here's why I need it:
I use .csv files in an import script, and one of the fields in these files
has a lot of new line characters. In fact, the "field" is really an entire
page of html. The .csv looks kinda like this:
"spykids.jpg";"na.jpg";"noQvalue";"0.45";"Spy Kids";"<big><b>This is a
previously-viewed DVD in the original case. Both the DVD and case are in
excellent condition and come with a life-time guarantee. </big></b><br><br>
<b>The Original One!</B><br>
(2002) Color - 88 Minutes
<br><BR>
....and so on
So the usual fgetcsv() doesn't work -- it interprets each new-line as a new
record (even though it's enclosed within double quotes). My thought is that
using stream_get_line with the double-quote defined as the ending would be
the way to override this behavior.