Navigation

Search

addData

Description

Adds an array of data into an existing table.

Syntax

void addData (array $inc_data[, int $custom_table])



Parameter $inc_data

Expected type: Array
Description: An array of data to include in the current table



Parameter $custom_table

Expected type: Integer
Description: The index of $context['tables'] corresponding to the custom table you wish to use.


Notes

  • If there are no existing tables, will create one with default attributes.
  • If custom_table isn't specified, it will use the last table created; if it is specified and doesn't exist, the function will return false.
  • If a set of keys have been specified, the function will check each required key is present in the incoming data. If this data is missing the current table's default value will be used.
  • If any key in the incoming data begins with '#sep#', the function will add a seperator accross the table at this point.
  • Once the incoming data has been sanitized, it is added to the table.
View all versions of this function