PHP code example of sagittaracc / tsml

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

    

sagittaracc / tsml example snippets


use sagittaracc\TSML;

TSML::parse(<TSML string>);

[
    'Root' => [
        'Item1' => 'Value1',
        'Item2' => [
            'SubItem21' => ['Value1', 'Value2', 'Value3'],
            'SubItem22' => [
                'SubSubItem221' => 'Value1',
                'SubSubItem222' => 'Value2',
            ],
        ],
        'Item3' => [],
        'Item4' => [
            'SubItem41' => ['Value1', 'Value2', 'Value3'],
            'SubItem42' => 1.2,
            'SubItem43' => true,
            'SubItem44' => false,
        ],
        'Item5' => [
            'SubItem51' => ['string1', 'string2'],
        ],
    ]
]