I try to figure out how to solve the following issue
$str = 'asus company';
$brands = "asus|lenovo|dell";
Than I would like to compare the 2 string variables and retrieve the matching sub string. The desired output would be 'asus'
.
I know that I can use strtr
function from php but this one returns just a boolean. I need the string as well.