RE: [PHP-WIN] how do i split text on multi linez .... ????
| From: | Dash McElroy | Date: | Thu, 09 May 2002 16:57:29 +0000 |
| Subject: | RE: [PHP-WIN] how do i split text on multi linez .... ???? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13651@lists.php.net to get a copy of this message | ||
Have you tried adding a <pre> before the <?php and a </pre> after the ?>?
-Dash
-----Original Message-----
From: toby z [mailto:blue_myth_1@yahoo.com]
Sent: Thursday, May 09, 2002 9:56 AM
To: php hlp list
Subject: [PHP-WIN] how do i split text on multi linez .... ????
guyz ... im stuck .... yet again .....
this time it is .....
im taking input from user .... a whole article and its
summary ....
its writing to the file fine ....
but it gives out the summary and the article in a
single line .....
starts from the first word and sees it thru the last
... ON THE SAME LINE .......
my code iz ....
<?php
$fp=fopen("c:\\name.txt", "wb");
fwrite($fp, "$lastName,$firstName ");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
fwrite($fp, "$lang ");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
fwrite($fp, "$cat ");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
fwrite($fp, "$title ");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
$string = fwrite($fp, "$summary ");
$array = preg_split( "/[ \t]+/", $string );
$myarray = explode("\r\n", "$string");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
fwrite($fp, "$body ");
fwrite($fp, "\r\n");
fwrite($fp, "\r\n");
fclose($fp);
?>
so .... i have tried it with preg_split, explode ....
togather az well az seperately .....
but ...... (N) .....
vat can i do to fix it ?????
thnx a million .......
toby ....
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php