$string="This is the " original sentence "";$a=htmlentities($string);$b=html_entity_decode($a);?>$c=substr($b, -6, 6);if (strstr($c, "dwdw\"")){ echo "it is present";} else { echo "it is absent";}?>