\n must be included in double-quotes because it's treated like a variable. echo "This works\n"; // Displays: This works
echo "This doesn't work\n'; // Displays: This doesn't work\n > From: [EMAIL PROTECTED] (Labunski) > Newsgroups: php.general > Date: Mon, 5 Apr 2004 00:58:35 +0300 > To: [EMAIL PROTECTED] > Subject: \n is not working! > > \n isn't working properly. > > Why do this line $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; writes to > the document > one|two|three\n > but not > one|two|three (and break) > > > > whole code: > > if ($a=="new"){ > $post_0 = $_POST["one"]; > $post_1 = $_POST["two"]; > $post_2 = $_POST["three"]; > if ($post_1 !=""){ > if ($post_2 !=""){ > $m_fails=fopen('../data/menu.txt','a'); > $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; > fwrite($m_fails,$new_topic); > fclose($m_fails); > }} > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php