title: parse php code snippet as a string to get the value of a particular variable
body: <p>I have a varchar field in my db which contains :</p>
  
  <pre><code> "&lt;?php     
       $html = 'abc' ;    
       $ad_content = Agencies_anonymous::getAd($html);    
       echo $ad_content;
    ?&gt;"
  </code></pre>
  
  <p>Now , in my code, I have to read this field value and get the value of the variable <strong>$html</strong></p>
  
  <p>.What would be the apt way to do this ?</p>
  
  <p>Supposedly , I have extracted the field value as a string(*$html_string*) in my code . </p>
  
  <p>What will be the appropiate regular expression that I should apply for this ? Or , is there any robust method using string functions ?</p>