Generating fixed-width field data records
<?php $books = array( array('A','S',1927), array('T','W',1979) ); foreach ($books as $book) { print pack('A25A15A4', $book[0], $book[1], $book[2]) . "\n"; } ?>