$find = array('Case'
, 'UNION'
, 'Information_scheme'
);
$searchInArray = array('This is the union'
, 'that case was not mine'
, 'nor was the information_scheme ready'
);
$searchInString = 'This is the union that case was not mine nor was the information_scheme ready';
$replaceWithString = '__';
$resultA = str_ireplace($find, $replaceWithString, $searchInArray);
$resultB = str_ireplace($find, $replaceWithString, $searchInString);
// results will display as follows
echo "resulA:" . print_r($resultA, true);
resultA: Array (
[0] => This is the __
[1] => that __ was not mine
[2] => nor was the __ ready
)
echo "resultB:" . print_r($resultB, true);
resultB: This is the __ that __ was not mine nor was the __ ready