Re: printf -- no newlines, tabs

From: Date: Thu, 22 Jun 2000 17:14:09 +0000
Subject: Re: printf -- no newlines, tabs
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-576@lists.php.net to get a copy of this message
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)

« previous php.db (#576) next »