| Prozac |
02-27-2006 09:38 PM |
array modifiers
Let's say I have an array:
PHP Code:
this.fuit={"apple","orange","bananna"};
and you want to add "pear" to the array.
What would it involve to get the array to look like:
PHP Code:
this.fuit={"apple","orange","bananna","pear"};
or
PHP Code:
this.fuit={"pear","apple","orange","bananna"};
or
PHP Code:
this.fuit={"apple","orange","pear","bananna"};
?
and what is involved in removing an item from an array of strings and having the array self-compress so there are no emty spaces, such as:
before
PHP Code:
this.fuit={"apple","orange","bananna"};
and after
PHP Code:
this.fuit={"apple","bananna"};
?
|