J
jtprince
I need to be able to insert a single element array into another array. Easy, right?
=> ["one", "two", "three"]
# insertion of elements into an array is easy
# now, let's insert an array into the array:
# ??????
What I need is this after an insertion:
["one", ["pancake"], "chicken", "two", "three"]
many thanks!
=> ["one", "two", "three"]
# insertion of elements into an array is easy
=> ["one", "chicken", "two", "three"]ar[1,0] = 'chicken' => "chicken"
ar
# now, let's insert an array into the array:
=> ["one", "pancake", "chicken", "two", "three"]ar[1,0] = ['pancake'] => ["pancake"]
ar
# ??????
What I need is this after an insertion:
["one", ["pancake"], "chicken", "two", "three"]
many thanks!