- substr: documentation ( source)
- strpos: documentation ( source)
<?php
$text = 'Here\'s some text and stuff
what is your favorite color?
@OTHER["favorite color"]
Whats your favorite food?
@OTHER["favorite food"]';
while(strpos($text, "@OTHER[") !== false){
$start = strpos($text, '@OTHER["') + 8;
$stop = strpos($text, '"]', $start);
echo substr($text, $start, $stop-$start); exit;
}