PHP code example of bileji / xml

1. Go to this page and download the library: Download bileji/xml 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/ */

    

bileji / xml example snippets

array
array (
  'recipe' => 
  array (
    0 => 
    array (
      '@attributes' => 
      array (
        'keywords' => 'attribute',
      ),
      'preptime' => '5 minutes',
      'recipename' => 'Ice Cream Sundae',
      'ingredlist' => 
      array (
        'listitem' => 
        array (
          0 => 
          array (
            'quantity' => '1',
            'itemdescription' => 'nuts',
          ),
          1 => 
          array (
            'quantity' => '1',
            'itemdescription' => 'cherry',
          ),
        ),
      ),
    ),
  ),
)

$xmlIo->write('./recipe.xml', $xmldata);