Hey something I just found out by accident that's going to save me a lot of work provided there are no side effects, is that lets say you have this file 

```
0
0
0

```

And you need to add numbers to it, sort of like a tally, but you also want to modify specific characters in the string, instead of adding them....but you want to add to the end instead of modifying any non-existant indices...

So if you take one of those lines above, and use str\_split on it, then try to add something via a numbered index, it seems to not get confused!

Like say I want to modify the 20th index of line 2 of that file. Since there is no 20th index it will just automatically add the element to the end of the array.

Can I just let this slide or might this be risky to just let it do this? Like a side effect I'm not aware of or something....

Man if there was ever any of my questions to get closed because they didn't understand what I was asking.... :P 

Sorry but I can't think of how else to word it.

Ok here's some code

```
$change_str = str_split($array_change[$list_num]);
UltraDB($change_str, "Change String BEFORE");
$change_str[20] = '5';
$array_change[$list_num] = implode('', $change_str);
foreach($array_change as $v){
file_put_contents("file.txt", $v . "\n", FILE_APPEND);
}
UltraDB($array_change, "File is now.");

```

UltraDB is just my debugging function combining var\_dump echoing and line breaks

EDIT: Ok just thought how to word my question better: When an index doesn't exist in an array made from str\_split, but you want to add a certain index of that array, if that index doesn't yet exist, is it normal for it just to add what you're adding to an end index instead?