- str_replace: documentation ( source)
<?php
$valid_strings = array("<p>"," ");
$test1 = '<p>asdasdasdasdasdasdasd</p>';
$test2 = '<p> </p>';
echo ContainsAnythingElseThan($test1,$valid_strings);
function ContainsAnythingElseThan($the_string,$the_valid_strings_array)
{
return count(str_replace($the_string,$the_valid_strings_array,''))!=0;
}