hanlonj Posted June 16, 2007 Share Posted June 16, 2007 Hi, I have a number of lines of code which display information to the screen. <code> $msg .= "Name : $name \n"; $msg .= "Address : $address \n"; </code> I want to be able to put tabs in between the "Name" and "$name" so I can align all the data in a column to look easier on the eye. How do I do this? I think it's something like "/t" but i'm not sure. hj Quote Link to comment Share on other sites More sharing options...
chigley Posted June 16, 2007 Share Posted June 16, 2007 You can use for the equivalent of a tab key output. You'd be better using a table though! Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 16, 2007 Share Posted June 16, 2007 \n <<< new line \t <<< tab \n\t <<< new line and tab   << space on a line nl2br($varable) << brake at new line from form input wordwrap($varable,10,"<br>") << brake at number 10 Quote Link to comment Share on other sites More sharing options...
chigley Posted June 16, 2007 Share Posted June 16, 2007 \t only outputs a tab in the source of the output. Unless told otherwise, HTML will ignore all whitespace (including tabs) so you will have to use to have the actual tab outputted to the page. Quote Link to comment Share on other sites More sharing options...
hanlonj Posted June 16, 2007 Author Share Posted June 16, 2007 Thanks guys. Another thing, I have all my form fields stored in variables and they are all being passed to my processor file except for one. It's a "text area" and when I echo it, it displays blank. It is inside the form and variable names are correct. I cannot figure this out. Is there anything different about text areas? hj Quote Link to comment Share on other sites More sharing options...
AndyB Posted June 16, 2007 Share Posted June 16, 2007 a textarea is just another input. If it does not appear to be passed along, there's something wrong with your code (variable names duplicated, variable names mismatched, data display code error, etc.). Hard to fix what we can't see. Quote Link to comment Share on other sites More sharing options...
hanlonj Posted June 16, 2007 Author Share Posted June 16, 2007 a textarea is just another input. If it does not appear to be passed along, there's something wrong with your code (variable names duplicated, variable names mismatched, data display code error, etc.). Hard to fix what we can't see. Thanks.Uppercase/lowecase conflict. sorted now. hj Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.