For historic reasons, I have a file that contains a number of records in
which the fields are seperated by the NULL character, i.e, 


I need to parse out the fields from this string.

The string is read into the program using 

        $buffer = fgets(...).

This would be no problem in Perl or C but I cannot get this to work in PHP.

I have tried using 

        preg_split("/\0/", $buffer);

But this fails. I've tried walking through the string but it seems that
$buffer only has the content up to the first NULL character.

Does anyone have a simple solution to this problem.



PHP General Mailing List (
To unsubscribe, visit:

Reply via email to