diff --git a/Insert.md b/Insert.md new file mode 100644 index 0000000..6c51b1b --- /dev/null +++ b/Insert.md @@ -0,0 +1,22 @@ +There's 1 way to `Insert` items into the XMLDB: + +## Insert Items + +*Syntax:* `public function insertItem($id = null, $attributes = null, $childs = null, $table)` + +*Example:* + +```php +$xmldb = new XMLDB('db.xml'); +$xmldb->insertItem('test', array('name'=>'alright'), array('visibility'=>'true', 'x'=>'33'), 'table1') +``` + +This will insert the following item into _table1_ +`$id` can now be _null_ and *must* be _null_ if you use autoincrement. It will return `false` otherwise. + +```xml + + true + 33 + +``` \ No newline at end of file