title: get hidden input tag value as string using PHP simple HTML DOM
body: <p>I am trying to get the input type hidden tag values (CAS, AH, 11, etc.) along with the name attribute but all I get is a blank page upon running my PHP based parser. Anybody know what's wrong? I already checked <a href="https://stackoverflow.com/questions/6496220/grabbing-hidden-inputs-as-a-string-using-php-simple-html-dom-parser">Grabbing hidden inputs as a string (Using PHP Simple HTML DOM Parser)</a> but it was of no help.</p>
  
  <p>Block of html I need to iterate through:</p>
  
  <pre><code>&lt;td valign="bottom" align="center"&gt;
  &lt;input type="hidden" value="CAS" name="College"&gt;
  &lt;input type="hidden" value="AH" name="Dept"&gt;
  &lt;input type="hidden" value="111" name="Course"&gt;
  &lt;input type="hidden" value="J1" name="Section"&gt;
  &lt;input type="hidden" value="" name="Subject"&gt;
  &lt;input type="hidden" value="" name="MtgDay"&gt;
  &lt;input type="hidden" value="" name="MtgTime"&gt;
  </code></pre>
  
  <p>My solution that displays nothing:</p>
  
  <pre><code>&lt;?php
  include('simple_html_dom.php'); 
  
    $seed = 'https://www.bu.edu/link/bin/uiscgi_studentlink.pl/1346752597?ModuleName=univschr.pl&amp;SearchOptionDesc=Class+Subject&amp;SearchOptionCd=C&amp;KeySem=20133&amp;ViewSem=Fall+2012&amp;Subject=&amp;MtgDay=&amp;MtgTime=';
    web_scrape($seed);
  
    function web_scrape($url)
  {
      $data = new simple_html_dom();  
      $data-&gt;load_file($url);
      $nodes = $data-&gt;find("/html/body/form/center/table/tbody/tr/td[2]/input[type=hidden]");
  
      foreach ($nodes as $node) {
      $val = $node-&gt;value;
      echo $val;
      }
  
  }
  
   ?&gt;
  </code></pre>