Skip to content

Commit 505d71a

Browse files
committed
Add README.md
1 parent 566e294 commit 505d71a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PhpArrayToXml
2+
3+
Convert an array to XML with PHP
4+
5+
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
6+
[![Build Status](https://img.shields.io/travis/refactorstudio/php-array-to-xml/master.svg?style=flat-square)](https://travis-ci.org/refactorstudio/php-array-to-xml)
7+
8+
## Usage
9+
10+
Basic example:
11+
```php
12+
use RefactorStudio\PhpArrayToXml\PhpArrayToXml;
13+
14+
$converter = new PhpArrayToXml();
15+
16+
$result = $converter->toXmlString(['title' => 'My Products']);
17+
```
18+
19+
Output:
20+
```xml
21+
<?xml version="1.0" encoding="UTF-8"?>
22+
<root><title>My Products</title></root>
23+
```

0 commit comments

Comments
 (0)