Wednesday 13 January 2016

How to get href attribute value using PHP?

<?php

$str = '<a href="http://phpkishan.blogspot.in/">PHP Kishan Kachhadiya</a>';
$s = explode('href="',$str);
$t = explode('">',$s[1]);
print $t[0];

?>

No comments:

Post a Comment