PHP code example of 8ctopus / array-to-table

1. Go to this page and download the library: Download 8ctopus/array-to-table 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/ */

    

8ctopus / array-to-table example snippets




declare(strict_types=1);

use Oct8pus\ArrayToTable\ArrayToTable;

   'transactionId' => 'A1-2019',
        'refunded' => 0,
        'purchaseDate' => '2019-12-01 00:00:00',
        'expiryDate' => '2020-12-01 00:00:00',
    ], [
        'id' => 2,
        'firstName' => 'Mark',
        'transactionId' => 'A1-2020',
        'refunded' => 0,
        'purchaseDate' => '2020-12-05 00:00:00',
        'expiryDate' => '2021-12-05 00:00:00',
    ], [
        'id' => 3,
        'firstName' => 'Joe',
        'transactionId' => 'A1-2022',
        'refunded' => 1,
        'purchaseDate' => '2022-12-05 00:00:00',
        'expiryDate' => '2023-12-05 00:00:00',
    ],
];

echo (new ArrayToTable($data))
    ->render();