php check if domain equals value, then perform action
<p>I need to take a variable that contains a URL, and check to see if the domain equals a certain domain, if it does, echo one variable, if not, echo another.</p>

<pre><code>$domain = "http://www.google.com/docs";
if ($domain == google.com)
{ echo "yes"; }
else
{ echo "no"; }
</code></pre>

<p>Im not sure how to write the second line where it checks the domain to see if $domain contains the url in the if statement.</p>
