PHP code example of oliverde8 / fixed-width-file
1. Go to this page and download the library: Download oliverde8/fixed-width-file library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oliverde8 / fixed-width-file example snippets
// First line
$data = array();
$data['year'] = 2016;
$data['month'] = 02;
$data['day'] = 15;
$data['description'] = "This is a description" ;
$writer->writeLine($data);
// second line
$data = array();
$data['year'] = 2016;
$data['month'] = 02;
$data['day'] = 1;
$data['description'] = "This is a description2" ;
$writer->writeLine($data);
$writer->terminate():