Let's say I have a string: $link = "<a href=\"http://domainname.com/page.php\">This is my page.</a>"; What I want to do is snag the url out of that string without anything else. Outputting: $url = "http://domainname.com/page.php"; Does anyone know how this could be done? Thanks in advance.
$link = "<a href=\"http://domainname.com/page.php\">This is my page.</a>"; if (ereg('\"(.*)\"',$link,$out)){$url=$out[0];} dont verify true