Codice PHP:
<?php

function array_search_substr($v) {

    return (
strpos($v$GLOBALS['searchStr']) !== FALSE);
    
}

$array = Array('animale: cane',
          
'colore: rosso',
          
'colore: verde',
          
'lettera: g',
          
'colore: xxxx');

print_r($array);


$searchStr 'colore';

$array_s array_filter($array'array_search_substr');

print_r($array_s);

?>