![]() |
This is very easy to do using SimpleXML: |
Example:
PHP
<?php
$a = new SimpleXMLElement('<a href="www.something.com">Click here</a>');
echo $a['href']; // will echo www.something.com
?>
How to get URL from a Tag in PHP | PHP XML Tutorial |
How to extract URL from a Tag in PHP | PHP XML Tutorial |
Read Full: | PHP XML Tutorial |
Category: | Web Tutorial |
Sub Category: | PHP XML Tutorial |
Uploaded by: | Admin |
Views: | 102 |
Reffered: https://stackoverflow.com/questions/6365701/php-extract-link-from-a-tag