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

Popular posts from this blog

php - Array to string conversion smarty template -

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -