could also use something like this:
<?php
$commonPhrases = array(
'Computer repair',
'Buy Computer',
'Computer software',
'Need a computer'
'Computer',
);
$common_phrases_fixed = array_map( 'preg_quote', $commonPhrases, array_fill( 0, count( $commonPhrases ) ,'~' ) );
preg_match_all( '~('.join( '|', $common_phrases_fixed ).')~iUs', $string_to_search_in, $matches );
print_r( $matches );
?>
the results could then be filtered down to prevent duplicate matches I think, unless you want to match the same part of the text multiple times if they match multiple keyword entries, then what you had was fine.