Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

Write to File With Line breaks?

Links for php scripts

Moderators: macek, egami, gesf

Postby sigix » Sun Oct 26, 2003 12:09 am

try this code,
is it giving you the required result
<?php
$fp=fopen("test.txt","w+");
$msg="HEllo\nhow are you\nand what are you doing\n";
$msg.="line\n";
fwrite($fp,$msg,strlen($msg));
fclose($fp);
?>
sigix
php-forum Active User
php-forum Active User
 
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Return to PHP Scripts

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron