Go to: Synopsis. Return value. MEL examples.
int stringArrayInsertAtIndex(int $index, string[] $list, string $item)
None
Variable Name | Variable Type | Description |
---|---|---|
$index | int | The index into $list to add $str at |
$list | string[] | A list of string values. |
$item | string | The new item to add to $list at $index |
string $array1[] = {"item1", "item2", "item3"}; // Result: item1 item2 item1 // stringArrayInsertAtIndex(1, $array1, "new"); // Result: 1 // print $array1; // Result: item1 new item2 item3 //