need to generate fixed-length file

From: Date: Wed, 06 Sep 2006 20:56:14 +0000
Subject: need to generate fixed-length file
Groups: php.general 
Request: Send a blank email to php-general+get-241426@lists.php.net to get a copy of this message
I'm having trouble generating a fixed-length (i.e., non-delimited) file format out of PHP 4, based on queries out of MySQL. These files are getting imported into a Unidata database and require a very specific byte-mapping format. However, while the fopen used with length will TRUNCATE to a specific length, it also won't pad to that length. Is there a function I'm missing somewhere that will let you specify a field length and pad accordingly? If not, any suggestions as to approach will be greatly appreciated! Many thanks, Karen Goeller

« previous php.general (#241426) next »