php - automatically populate arrays -
strangely enough haven't found question or answers problem (should quite basic), ask here.
in php if have array named myarray don't know contents of, can't this:
$myarray[20] = "some string";
because entry 20 may exist.
so there way automatically insert string last entry, nothing overwritten in array?
you add new item array like:
$myarray[] = "some string";
this automatically add end of existing array without overwriting existing array entries.
Comments
Post a Comment