On Tue, Jul 29, 2014 at 11:52 PM, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx> 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]);