I have a string to simulate:
<li><a title="string" href="http://geting.com/?v=123?t=abc">Opção 1</a></li>
I would like something that takes the parameter ?v=
, just it, same as when we get the method $_GET["v"]
.
How could you do this? I believe preg_match
could help me, but I do not understand about?
$string = '<li><a title="string" href="http://geting.com/?v=123?t=abc">Opção 1</a></li>';
echo preg_match('regex',$string);
Desired outcome: 123