highlight matched data only works for single value matched

As the following code show , i want to print the $input but with highlight matched values from $match It works but it highlight only single value and the others are not <?php $input = Array ( ‘https://www.imdb.com/title/tt5294518/’ , ‘https://www.imdb.com/title/tt6924650/’ , ‘https://www.imdb.com/title/tt7313348/’ , ‘https://www.imdb.com/title/tt9134216/’ , ‘https://www.imdb.com/title/tt9586294/’ , ‘https://www.imdb.com/title/tt3256226/’ ); $match = Array ( ‘tt3256226’ ,…