I want to mark (highlight) the keywords a user has input as search parameters. I've tried the following PHP code to do this. It adds the tag effectively but for some reason displays each string as "Array" rather than it's value.
$find = array("HELLO","WORLD"); // Case-insensitive
$arr = array("Hello","world","!");
print_r(str_ireplace($find,'<mark>'.$find.'</mark>',$arr));
https://i.imgur.com/7vryXlY (demo image, not enough rep to embed)