Re: printf -- no newlines, tabs

From: Date: Thu, 22 Jun 2000 17:45:36 +0000
Subject: Re: printf -- no newlines, tabs
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-582@lists.php.net to get a copy of this message
on 6/22/00 1:14 PM, Zak Greant at zak@nucleus.com wrote: > At 01:02 PM 6/22/00 -0400, Randy Perry wrote: >> I can't seem to get printf to do newlines or tabs. Is there anything wrong >> with the following code? >> >> while ($myrow = mysql_fetch_array($result)) { >> printf("%s\t%s\t%s\n\", $myrow["fname"], $myrow["lname"], >> $myrow["email"]); > > Hi Randy, > > If your output is going into a page that is parsed as html by your browser, > then any amount of whitespace (spaces, newlines, tabs, etc...) will be > compressed down to a single space. > > Try putting your output between a pair of pre tags. > > hth > Zak Greant > Creative Director > Nucleus Information Service Inc. > > "A camel is a horse designed by a committee." > - Alex Issigonis (Designer of the Austin Mini) > > Thanks. Never heard of pre tags before...but they work. -- Randy Perry rgp systems Mac Consulting/Sales

« previous php.db (#582) next »