Re: TAB Syntax

From: Date: Wed, 30 Jun 2004 10:05:35 +0000
Subject: Re: TAB Syntax
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-189283@lists.php.net to get a copy of this message
Lars I got it working a treat. Thanks very much. This is what I ended up with: echo "<pre>This\tis\ta\ttest.</pre>"; and I simply added a PRE tag to the CSS file which has the same attributes as the body tag. Thanks very much for your patience Lars. -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Lars Torben Wilson" <torben@php.net> wrote in message news:40E281EC.8080100@php.net... > Harlequin wrote: > > > Cheers Lars. > > > > So, for example, if I wanted to display some plain text tabbed I'd use: > > > > echo "<pre>string1\tstring2\tstring3</pre>"; > > > > There's just one problem though - it formats the text differently to the > > rest of the page (I'm using CSS to control this). > > > > Any thoughts...? > > > > > Try adding 'white-space: pre;' to the CSS for that bit: > > <div style="white-space: pre;"> > <?php echo "This\tis\n\ta test."; ?> > </div> > > See if adding that helps. > > > Cheers, > > Torben

« previous php.general (#189283) next »