Re: printf -- no newlines, tabs
| From: | Dave Reinhardt | Date: | Sun, 25 Jun 2000 14:53:19 +0000 |
| Subject: | Re: printf -- no newlines, tabs | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-611@lists.php.net to get a copy of this message | ||
Here is one that works.
if ($myrow = mysql_fetch_array($result)) {
// display list if there are records to display
do {
printf("<a href=\"%s?id=%s\">%s %s %s</a><br>\n", $PHP_SELF,
$myrow["edt"], $myrow["fname"], $myrow["mname"],
$myrow["lname"]);
} while ($myrow = mysql_fetch_array($result));
} else {
// no records to display
echo "Sorry, no records were found!";
}
}
-------------------------------------------------------------
On Thu, 22 Jun 2000 13:02:28 -0400
Randy Perry <radknee@earthlink.net> 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"]);
>>-
>>-
>>---
>>-PHP Database Mailing List (http://www.php.net/)
>>-To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
>>-For additional commands, e-mail: php-db-help@lists.php.net
>>-To contact the list administrators, e-mail: php-list-admin@lists.php.net
>>-
>>-