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>
- Host: GitHub
- URL: https://github.com/solutionstack/php-data-to-ul-parser
- Owner: solutionstack
- Created: 2018-03-16T14:57:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T16:13:55.000Z (over 7 years ago)
- Last Synced: 2024-12-31T17:47:15.360Z (6 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```