.. _finsertitem: ########### insert_item ########### :doc:`Item-related functions ` ******* Summary ******* .. include:: /Reference/libraries/globals/summary/insert_item.rst .. php:function:: insert_item(array $metadata = Array, array $elementTexts = Array, array $fileMetadata = Array) Insert a new item into the Omeka database. :param array $metadata: Set of metadata options for configuring the item. Array which can include the following properties: .. raw:: html :param array $elementTexts: Array of element texts to assign to the item. This follows the format: .. code-block:: php array( [element set name] => array( [element name] => array( array('text' => [string], 'html' => [false|true]), array('text' => [string], 'html' => [false|true]) ), [element name] => array( array('text' => [string], 'html' => [false|true]), array('text' => [string], 'html' => [false|true]) ) ), [element set name] => array( [element name] => array( array('text' => [string], 'html' => [false|true]), array('text' => [string], 'html' => [false|true]) ), [element name] => array( array('text' => [string], 'html' => [false|true]), array('text' => [string], 'html' => [false|true]) ) ) ); :param array $fileMetadata: Set of metadata options that allow one or more files to be associated with the item. Includes the following options: .. raw:: html :returns: Item ***** Usage ***** .. include:: /Reference/libraries/globals/usage/insert_item.rst ******** Examples ******** .. include:: /Reference/libraries/globals/examples/insert_item.rst ******** See Also ******** .. include:: /Reference/libraries/globals/see_also/insert_item.rst