An open API service indexing awesome lists of open source software.

https://github.com/solutionstack/php-data-to-ul-parser

Demo for parsing Structured text data to an HTML <ul>
https://github.com/solutionstack/php-data-to-ul-parser

Last synced: 4 months ago
JSON representation

Demo for parsing Structured text data to an HTML <ul>

Awesome Lists containing this project

README

        

# php-data-to-ul-parser
Demo for parsing Structured text data to an HTML <ul>

## The PHP scripts expects structured/formatted data in the input_data file

The input file format is formatted with each level indexed by four spaces more than the level above,
Level zero (the first line) is indexed with four spaces exactly

### Example
```
Head
Same level
Sublevel
Sub-sub-level
same-level
Sublevel
Same level
Sublevel
Same level

```

The class is automatically called, when you run the index.php file. With the input above the output should be

```html


  • Head

  • Same level


    • Sublevel


      • Sub-sub-level

      • same-level


    • Sublevel


  • Same level

    • Sublevel



  • Same level



```