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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -