title: Extract URLs from text in PHP
body: <p>I have this text:</p>
  
  <pre><code>$string = "this is my friend's website http://example.com I think it is coll";
  </code></pre>
  
  <p>How can I extract the link into another variable?</p>
  
  <p>I know it should be by using regular expression especially <code>preg_match()</code> but I don't know how?</p>