PHP code example of nextgen-tech / gs1-decoder

1. Go to this page and download the library: Download nextgen-tech/gs1-decoder 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/ */

    

nextgen-tech / gs1-decoder example snippets


use NGT\Barcode\GS1Decoder\Decoder;

$decoder = new Decoder($delimiter = '[FNC1]');
$barcode = $decoder->decode('0195012345678903422616[FNC1]3103000123');

print_r($barcode->toArray());