- strip_tags: documentation ( source)
- implode: documentation ( source)
- trim: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
function prepareForSearch(array $strings) {
return trim(html_entity_decode(strip_tags(implode(' ', $strings)), ENT_COMPAT, 'UTF-8'));
}
echo prepareForSearch(array('© <br>ab'));