On Thu, 27 Feb 2003 01:02:54 +0800, Jason Wong wrote:
>On Thursday 27 February 2003 00:54, {R}ichard Ashton wrote:
>> I have the body ov a Usnet article, all of it, in $body. I want to
>> split it into lines.
>>
>> I have tried
>>
>> $lines = explode( X, $body);
>>
>> where I have used
>>
>> X = "0x0A"
>> X = '0x0A'
>> X = "0x0D"
>> X = '0x0A'
>> X = "\r"
>
>Try "\n".

If I hadn't pushed send by mistake I would have added

X = "\r"
X = '\r'
X = "\n"
X = '\n'

I then have

echo "pieces $pieces[0] <br>";
echo "pieces $pieces[1] <br>";
echo "pieces $pieces[2] <br>";
echo "pieces $pieces[3] <br>";
echo "pieces $pieces[4] <br>";
echo "pieces $pieces[5] <br>";

If I look at $body with Hex editor there are lots of 0D 0A pairs and
further if I look at the source of the page generated by

echo $body; I can see the CRLF's

This is giving me pains in the neck :(

{R}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to