```
$arr = array('superman','gossipgirl',...);

$text = 'arbitary stuff here...';

```

What I want to do is find the first/last occurencing index of each word in `$arr` within `$text`,how to do it efficiently in PHP?