I have html code including elements. What I am trying to do is, I need the whole html code of this form element. For example, in the html code below
...
<p>Sample</p>
<img src="..." />
<form method="post" >
<input type="hidden" value="v1" id="v1" name="task">
<input type="hidden" value="v2" name="v2">
...
</form>
<div>...</div>
...
I want to extract these codes:
<form method="post" >
<input type="hidden" value="v1" id="v1" name="task">
<input type="hidden" value="v2" name="v2">
...
</form>
Since I am not so familiar with preg_match expression, I hardly can figure it out. I googled to understand expressions myself, but only could get small portion of grasp.
Can any one help me, please? Best regards.