regex - PHP - Match two strings ignoring span tags -
i looking function matches string string b (ignoring span tags)
a) shopping <span>stylish</span> rugs area b) shopping stylish rugs area
function should return true if match found else false, in above case should return true.
thanks
you can use strip_tags()
remove tags string.
$a = 'shopping <span>stylish</span> rugs area'; $b = 'shopping stylish rugs area'; var_dump(strip_tags($a) == $b); // outputs true
Comments
Post a Comment