# Search for a string in array

**URL:** <https://forum.kirupa.com/t/search-for-a-string-in-array/199512>\
**Category:** flash\
**Created:** [September 3, 2006, 12:41pm UTC](https://forum.kirupa.com/t/search-for-a-string-in-array/199512 "2006-09-03T12:41:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeline](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pixeline/32/885_2.png) [@pixeline](https://forum.kirupa.com/u/pixeline)\
**Post date:** [September 3, 2006, 12:41pm UTC](https://forum.kirupa.com/t/search-for-a-string-in-array/199512/1 "2006-09-03T12:41:25Z")

</div>

Hello all,

I have a multidimensional array holding the content of an xml file (several news iems).

archiveArray[0][0] contains the first news’s title

archiveArray[0][1] contains the first news’s date

archiveArray[0][2] contains the first news’s html content

archiveArray[1][0] contains the second news’s title

archiveArray[1][1] contains the second news’s date

archiveArray[1][2] contains the second news’s html content

I would like to implement a search functionality that enables searching the array in titles and html content for a given keyword, and returns all instances of the keyword found in the array, with the surrounding words ( a la google).

I didn’t find anything related to searching an array in the flash manual. Does anyone have a good clue on how to do it?

thanks in advance for your help!

alexandre
