我有一个字符串:
$string = "<td width='100px' valign='top'>tucson</td>
<a href='nickname.php?iddb=363656&server=2'>Walter_Shulz</a></td>
<td width='100px' valign='top'>tucson</td>
<td><a href='nickname.php?iddb=842627&server=2'>Walter_Shulzzz</a></td>";
在昵称= Walter_Shulz的情况下,如何获取“ href”?
示例:
如果我有昵称Walter_Shulz
,那么href
将是$href = "nickname.php?iddb=363656&server=2";
如果我有昵称Walter_Shulzzz
,那么href
将是$href = "nickname.php?iddb=842627&server=2";