Re: exporting data
| From: | Peter Pistorius | Date: | Sun, 20 Apr 2003 06:25:28 +0000 |
| Subject: | Re: exporting data | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144525@lists.php.net to get a copy of this message | ||
Field size? Like "name varchar(20)" would have to export the persons name
with whitespace behind it for 20 characters? Ie: "John "?
If that was the case I would take:
$charcnt = mysql_field_len($field_name) - strlen($name);
$whitespace = null;
for ($i = 0; $i < $charcnt; $i++) {
$whitespace .= ' ';
}
write to file: $name.$whitespace;
Peter "Pod" Pistorius
peterp@podbox.co.za