PHP code example of dajoho / itunes-php

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

    

dajoho / itunes-php example snippets




$xml_path = 'iTunes playlist export.xml';

$itunes = new iTunesXMLParser();
$itunes->sort_field = 'Track ID';
$itunes->sort_direction = 'ascending';
$itunes->open( $xml_path );

/*
  "$itunes->data" is now available. print_r to see what's inside:
    print_r( $itunes->data );
*/