# Removing Value From Array

**URL:** https://forum.kirupa.com/t/removing-value-from-array/84594
**Category:** flash
**Created:** [March 29, 2005, 1:00am UTC](https://forum.kirupa.com/t/removing-value-from-array/84594 "2005-03-29T01:00:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)
#### Post date: [March 29, 2005, 1:00am UTC](https://forum.kirupa.com/t/removing-value-from-array/84594/1 "2005-03-29T01:00:49Z")

</div>

The as dictionary tells me I can use array.splice to remove an element from an array like so

```auto

var myPets_array:Array = new Array("cat", "dog", "bird", "fish");
trace( myPets_array.splice(1) ); // dog,bird,fish
trace( myPets_array ); // cat

```

Which is all fine an dandy, but what if I want to use a value instead of the index number?

like:

```auto

var myPets_array:Array = new Array("cat", "dog", "bird", "fish");
trace( myPets_array.splice("cat") ); // dog,bird,fish
trace( myPets_array ); // cat

```

?
