On Wed, 2006-09-06 at 16:56 -0400, Karen Goeller wrote:
> 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!

str_pad()

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to