$value = "http://www.somesite.com"; if (strpos("http://", $value) === false) echo "not inside" //returns false, or nothing.