Hello everyone. My php script outputs some information into a text file and I am trying to have information put onto seperate lines for example: the text currently looks like this: firstname lastname city state I want it to look like this: firstname lastname city state i have tried using < /br> and ; at the end of my variables but doesnt seam to be working..any ideas?
try putting /n after the variables for the newline command. If it doesn't work could you post the code
You use \n for *nix, \r\n for windows and \r for Mac. But I think \n by itself is often quite enough. Thomas
Change from </br> to >> <br /> if you print or echo for display on browser i think it can show. example your data // profile.txt //-------------------- firstname<br/> lastname<br /> age<br/> you must split data for show again
<?php $stuffToWrite = "$firstname\n"; $stuffToWrite =. "$lastname\n"; $stuffToWrite =. "$city\n"; $stuffToWrite =. "$state\n"; writeMyStuff($stuffToWrite); ?> PHP: Obviously replacing the function/variable names as appropriate