Better yet, use the nl2br function to convert newline characters (\n) into <br> tags.. see: http://www.php.net/manual/en/function.nl2br.php
At 05:56 PM 5/9/02 +0100, toby z wrote: >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 -- Mike Flynn -- mike @ mikeflynn . net home => work => home => shop => home [adbusters] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php