I want to write a paragraph with a tab in front in a text area. Using PHP how can I display the paragraph with same format means a tab in front.
Thank you.
Hmm, does this work?
$string="Now is the time for all good men to come to the aid of their country..."; echo "<textarea>\t$string</textarea>";
I can do it manually but what if I have couple of paragraphs and user have some balnk space in the begining of each paragaph. How can I display those paragragh along with the same format that user inputed earlier.
Thnak you.
How exactly are the users entering the text?
Perhaps the <PRE> </PRE> tagset is what you are looking for. That will perserve the tabs, white-space, and line breaks just as it appears, say, in notepad.