PHP code example of silarhi / zugferd-factur-x

1. Go to this page and download the library: Download silarhi/zugferd-factur-x 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/ */

    

silarhi / zugferd-factur-x example snippets


use src\Reader;

$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);

use src\Builder;
 
$obj = ...;

$xml = Builder::create()->transform($obj);
echo $xml; // Zugferd XML.