# as2 - Remove an item from array

**URL:** <https://forum.kirupa.com/t/as2-remove-an-item-from-array/329572>\
**Category:** Uncategorized\
**Created:** [September 16, 2012, 10:13pm UTC](https://forum.kirupa.com/t/as2-remove-an-item-from-array/329572 "2012-09-16T22:13:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcteam](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bcteam](https://forum.kirupa.com/u/bcteam)\
**Post date:** [September 16, 2012, 10:13pm UTC](https://forum.kirupa.com/t/as2-remove-an-item-from-array/329572/1 "2012-09-16T22:13:27Z")

</div>

Hi guys! This code asks questions randomly. But I dont want it to repeat an already asked question.  
So I have to remove asked items from array. How can I do that? Thanks…

```php

 var questions = _root.sorular._totalframes; // questions as frames
kelimeler = new Array ();
for (i = 0; i < questions; i++) {
var num = random(questions) + 1; // select a question
}_root.sorular.gotoAndStop(Number(num)); // now ask the question
 

```
