Horje
How to get URL from a Tag in PHP

This is very easy to do using SimpleXML:


How to extract URL from a Tag in PHP

Here is solution.
index.php
Example: PHP
<?php
$a = new SimpleXMLElement('<a href="www.something.com">Click here</a>');
echo $a['href']; // will echo www.something.com
?>

Output should be:

How to extract URL from a Tag in PHP





Related Articles
How to get URL from a Tag in PHP PHP XML Tutorial

Single Articles
How to extract URL from a Tag in PHPPHP XML Tutorial

Read Full:
PHP XML Tutorial
Category:
Web Tutorial
Sub Category:
PHP XML Tutorial
Uploaded:
5 months ago
Uploaded by:
Admin
Views:
11
Ref on:
View



Share on: