Getting h1 tag value using php
<p>I want to submit the value under h1 tag into my Sql table</p>

<p>Example, if this where the given input string:</p>

<pre><code> &lt;h1&gt;hello&lt;/h1&gt;
</code></pre>

<p>how to echo "hello" with php (this is a hidden value to submit along with form)</p>

<pre><code> &lt;input type="hidden" name="post_id" id="post_id" value="&lt;?php
    echo $Pattern = "/&lt;h1&gt;(.*?)&lt;\/h1&gt;/";
    ?&gt;" /&gt;
</code></pre>

<p>the above one writes</p>

<pre><code>/&lt;h1&gt;(.*?)&lt;/h1&gt;/
</code></pre>

<p>into my table</p>
