shadiadiph Posted May 8, 2009 Share Posted May 8, 2009 been playing with this for a while probably quicker to ask i have been adding \n\n to this but probably in the wrong place how can i make the following have a line break after each variable? <textarea><?=$touser?><?=$daterec?><?=$subject?><?=$newmessage?></textarea> Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/ Share on other sites More sharing options...
Presto-X Posted May 8, 2009 Share Posted May 8, 2009 Would this work? <textarea><?php echo $touser."\n".$daterec."\n".$subject."\n".$newmessage."\n"; ?></textarea> OR <textarea><?=$touser."\n".$daterec."\n".$subject."\n".$newmessage."\n"?></textarea> Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829897 Share on other sites More sharing options...
ILMV Posted May 8, 2009 Share Posted May 8, 2009 <textarea><?php echo($touser."\n\n".$daterec."\n\n".$subject."\n\n".$newmessage); ?></textarea> I haven't tested this, but it should work Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829899 Share on other sites More sharing options...
Ken2k7 Posted May 8, 2009 Share Posted May 8, 2009 ILMV, do you mean \n\n or did you really mean /n/n? Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829902 Share on other sites More sharing options...
ILMV Posted May 8, 2009 Share Posted May 8, 2009 Edited , it's been a long day Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829903 Share on other sites More sharing options...
Presto-X Posted May 8, 2009 Share Posted May 8, 2009 lol I hear ya. Hey I was reading some time back that using <?=?> is bad form vis <?PHP echo ?>, what do you guys think? Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829907 Share on other sites More sharing options...
shadiadiph Posted May 8, 2009 Author Share Posted May 8, 2009 thanks that works great thanks is there anyway to put a double line break before $touser?? Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829908 Share on other sites More sharing options...
Presto-X Posted May 8, 2009 Share Posted May 8, 2009 <textarea><?php echo "\n\n".$touser."\n".$daterec."\n".$subject."\n".$newmessage."\n"; ?></textarea> Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829913 Share on other sites More sharing options...
shadiadiph Posted May 8, 2009 Author Share Posted May 8, 2009 perfect presto-x thanks alot time for me to shut down i think the birds have just woken up the sun has risen and i am still up anyway thanks again Link to comment https://forums.phpfreaks.com/topic/157428-solved-adding-a-linebreak/#findComment-829920 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.