Extracting attribute with simplexml_load_string
<p>I'm trying to extract the href attribute of link as a string.</p>

<pre><code>&lt;a href="http://example.com" target="_blank" class="someclass"&gt;Read More&lt;/a&gt;
</code></pre>

<p>I'm using the following to read the extract the attribute:</p>

<pre><code>$link = simplexml_load_string($ad['meta_value']);
$order['logo'] = $logo['href']-&gt;asXML();
</code></pre>

<p>Instead of getting <code>http://example.com</code> I'm getting <code>href="http://example.com"</code>. Beside using str_replace() is there a way to extract the attribute as a string?</p>
