Garry's Mod Wiki

table.Add

table table.Add( table target, table source )

Description

Adds the contents from one table into another. The target table will be modified.

See also table.Inherit and table.Merge.

Arguments

1 table target
The table to insert the new values into.
2 table source
The table to retrieve the values from.

Returns

1 table
The target table.

Example

Demonstrates the use of this function. Note that duplicate values will be added.

local Test1 = {"One","Two","Three", "Four"} local Test2 = {"Four", "Five", "Six"} table.Add( Test1, Test2 ) print( table.concat(Test1, " ") )
Output: One Two Three Four Four Five Six

Page Links


Special Pages


Wikis

?

Render Time: 47ms

Session 0
DB GetPage 6
Generate Html 18
SaveChanges 8
Render Body 0
Render Sidebar 12