Re: Re: Lining up items on page

From: Date: Wed, 30 Jul 2014 04:00:24 +0000
Subject: Re: Re: Lining up items on page
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-323694@lists.php.net to get a copy of this message
On Tue, Jul 29, 2014 at 11:52 PM, Jim Giner <jim.giner@albanyhandball.com> wrote: > On 7/29/2014 11:36 PM, Ethan Rosenberg wrote: > >> Dear list - >> >> I wish to align my output. >> >> An example- >> >> fprintf($fptr1, "%s\t %s\t\n", $row1[0],$row1[1]); >> >> In each row of output if the strings are wider than the tab setting, the >> text will indent. >> >> Is there anyway I can formulate the fprinf so that each string will >> print at a specific place? >> >> TIA >> >> Ethan >> >> Why not use a table? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > If you know that the upper limit of the strings you can do: echo sprintf("%-30s %s", $row1[0],$row1[1]);

« previous php.general (#323694) next »