Quickest way to add object to array

Hi

This is such a simple question I feel stupid for asking it, but after searching the forums and google I still couldn’t find the answer:

What is the quickest way to add a string or an object at the end of an array. Like:

local array = {}
local test = “Testing”
array[] = test

That doesn’t work, but:
array[1] = test
or
array[“first”] = test
does.

For convenience and reference, is there a way to accomplish this without having to keep track of the numbers or keys? I just want to add the object at the end!

Thanks [import]uid: 13935 topic_id: 6616 reply_id: 306616[/import]

[lua]array[#array+1]=test[/lua] [import]uid: 6645 topic_id: 6616 reply_id: 23023[/import]