formatting "host" output
| From: | Tyler Longren | Date: | Fri, 20 Jul 2001 21:02:28 +0000 |
| Subject: | formatting "host" output | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-58976@lists.php.net to get a copy of this message | ||
$data = exec("host $lookup");
printf("<pre>%s</pre>", $data);
How can I format the output of that properly?
Sometimes, it's all on one line, and it's fine.
Other times, there's more than one line...like if there was an alias.
Any way to format it like it is on the command line?
Thanks,
Tyler