title: PHP echo scraped input Value from HTML
body: <p>I need to echo Values from input fields. Preferably <strong>$var</strong> name can be same as input fieldname. Sample: <code>echo $yesRedirect;</code> Should output: <code>No</code> </p>
  
  <pre><code>&lt;?php
  $html = array('&lt;input type="text" name="yesRedirect" id="yesRedirectfunction" value="No"&gt;',
  '&lt;input type="text" name="noRedirect" id="noRedirectfunction" value="Yes"&gt;',
  '&lt;input type="text" name="quickcheck" id="quickcheckfunction" value="No"&gt;');
  
  $result = array();
  
  foreach ($html as $name) {
  $dom = new DomDocument;
  $dom-&gt;loadHTML($name);
  var_dump($dom) . "\n";
  
  //echo $dom-&gt;getAttribute('name') . "\n";
  //echo $dom-&gt;getAttribute('value') . "\n";
  }
  
  echo $yesRedirect; // Should output: No
  echo $noRedirect;  // Should output: Yes
  ?&gt;
  </code></pre>
  
  <p>How can I simply echo input value? Is there any other way?
  Thank you for helping.</p>